feat(networkservices): generate AgentConnectivityTemplate and add to … - #18456
feat(networkservices): generate AgentConnectivityTemplate and add to …#18456ericlin0101 wants to merge 5 commits into
Conversation
|
Googlers: For automatic test runs see go/terraform-auto-test-runs. @slevenick, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
| docs: | ||
| base_url: projects/{{project}}/locations/{{location}}/agentConnectivityTemplates | ||
| self_link: projects/{{project}}/locations/{{location}}/agentConnectivityTemplates/{{name}} | ||
| create_url: projects/{{project}}/locations/{{location}}/agentConnectivityTemplates?agentConnectivityTemplateId={{name}} |
There was a problem hiding this comment.
Prefer reflecting agentConnectivityTemplateId in the field instead of name
| Name of the AgentConnectivityTemplate resource. | ||
| required: true | ||
| ignore_read: true | ||
| custom_expand: templates/terraform/custom_expand/network_services_agent_connectivity_template_name.go.tmpl |
There was a problem hiding this comment.
Is this required by the API? Prefer to remove otherwise
There was a problem hiding this comment.
It's not required by the API payload! I went ahead and removed the custom_expand in the latest commit, substituting it with agentConnectivityTemplateId as a url_param_only parameter.
| samples: | ||
| - name: network_services_agent_connectivity_template_basic | ||
| primary_resource_id: default | ||
| steps: |
There was a problem hiding this comment.
Thanks. Added an update test
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit f7093a9: Diff reportYour PR generated the following diffs in downstream repositories:
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_network_services_agent_connectivity_template" "primary" {
egress_network_config {
dns_peering_config {
domains = # value needed
target_network = # value needed
target_project = # value needed
}
network_attachment = # value needed
vpc_egress = # value needed
}
}
Missing service labelsThe following new resources do not have corresponding service labels:
If you believe this detection to be incorrect please raise the concern with your reviewer. Googlers: This error is safe to ignore once you've completed go/fix-missing-service-labels. Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the replaying VCR build log Step 2: Recording Mode
Caution Issues requiring attention before PR completion 🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the recording VCR build log or the debug logs folder for detailed results. @ericlin0101 VCR tests complete for f7093a9! |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit b1613a6: Diff reportYour PR generated the following diffs in downstream repositories:
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_network_services_agent_connectivity_template" "primary" {
egress_network_config {
dns_peering_config {
domains = # value needed
target_network = # value needed
target_project = # value needed
}
network_attachment = # value needed
vpc_egress = # value needed
}
}
Missing service labelsThe following new resources do not have corresponding service labels:
If you believe this detection to be incorrect please raise the concern with your reviewer. Googlers: This error is safe to ignore once you've completed go/fix-missing-service-labels. Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the replaying VCR build log Step 2: Recording Mode
Caution Issues requiring attention before PR completion 🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the recording VCR build log or the debug logs folder for detailed results. @ericlin0101, @slevenick VCR tests complete for b1613a6! |
- Removed trailing whitespace in AgentConnectivityTemplate.yaml - Added google_network_services_agent_connectivity_template to enrolled_teams.yml
- Created network_services_agent_connectivity_template_advanced sample - Handled dns_peering_config, network_attachment, and vpc_egress
- Added network_services_agent_connectivity_template_advanced_update.tf.tmpl to test update workflows for egress_network_config
This PR introduces Terraform support for managing Network Services Agent Connectivity Templates.
Changes included:
New Resource (google_network_services_agent_connectivity_template): Created the magic module definition AgentConnectivityTemplate.yaml to generate the new resource and explicitly map public configuration options (e.g. access_types, access_path, egress_network_config), skipping internal flags.
Modified Resource (google_network_services_agent_gateway): Added the agent_connectivity_template cross-reference field.
Examples & Tests: Updated the agent_gateway_full sample to automatically configure and bind an agent_connectivity_template natively within Terraform tests to ensure E2E Egress validation.