Skip to content

feat(networkservices): add DNS peering config to AgentGateway:#17545

Merged
melinath merged 1 commit into
GoogleCloudPlatform:mainfrom
JamesDuncanNz:agentgateway-add-dns-peering
Jun 12, 2026
Merged

feat(networkservices): add DNS peering config to AgentGateway:#17545
melinath merged 1 commit into
GoogleCloudPlatform:mainfrom
JamesDuncanNz:agentgateway-add-dns-peering

Conversation

@JamesDuncanNz

@JamesDuncanNz JamesDuncanNz commented May 13, 2026

Copy link
Copy Markdown
Contributor

Adds the dnsPeeringConfig nested object under privateConnectivity.egress
on google_network_services_agent_gateway, allowing users to specify
domains, targetProject, and targetNetwork so the gateway resolves
queries via Cloud DNS in a peered VPC.

Beta Provider Test Log

==> Checking that code complies with gofmt requirements...
go vet
TF_ACC_REFRESH_AFTER_APPLY=1 TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test ./google-beta/services/networkservices -v -run=TestAccNetworkServicesAgentGateway_networkServicesAgentGatewayFullExample -timeout 240m -ldflags="-X=github.com/hashicorp/terraform-provider-google-beta/version.ProviderVersion=acc"
=== RUN   TestAccNetworkServicesAgentGateway_networkServicesAgentGatewayFullExample
=== PAUSE TestAccNetworkServicesAgentGateway_networkServicesAgentGatewayFullExample
=== CONT  TestAccNetworkServicesAgentGateway_networkServicesAgentGatewayFullExample
--- PASS: TestAccNetworkServicesAgentGateway_networkServicesAgentGatewayFullExample (590.72s)
PASS
ok  	github.com/hashicorp/terraform-provider-google-beta/google-beta/services/networkservices	590.908s

GA Provider Test Log

==> Checking that code complies with gofmt requirements...
go vet
TF_ACC_REFRESH_AFTER_APPLY=1 TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test ./google/services/networkservices -v -run=TestAccNetworkServicesAgentGateway_networkServicesAgentGatewayFullExample -timeout 240m -ldflags="-X=github.com/hashicorp/terraform-provider-google/version.ProviderVersion=acc"
=== RUN   TestAccNetworkServicesAgentGateway_networkServicesAgentGatewayFullExample
=== PAUSE TestAccNetworkServicesAgentGateway_networkServicesAgentGatewayFullExample
=== CONT  TestAccNetworkServicesAgentGateway_networkServicesAgentGatewayFullExample
--- PASS: TestAccNetworkServicesAgentGateway_networkServicesAgentGatewayFullExample (712.94s)
PASS
ok  	github.com/hashicorp/terraform-provider-google/google/services/networkservices	713.119s

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

networkservices: added `dns_peering_config` field to `google_network_services_agent_gateway` resource

@github-actions github-actions Bot requested a review from melinath May 13, 2026 20:54
@github-actions

Copy link
Copy Markdown

Googlers: For automatic test runs see go/terraform-auto-test-runs.

@melinath, 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.

@modular-magician

This comment was marked as outdated.

@melinath

Copy link
Copy Markdown
Member

/gcbrun

@modular-magician

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@melinath melinath left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks straightforward.

However, it looks like the tests (and docs) for this resource are disabled (and have been since the resource was introduced in #16391) due to things needing to "stabilize".

Could you try enabling the tests (and docs?) at this point? I'd like to have automated test runs verifying that the resource & the new fields work as expected.

@modular-magician

This comment was marked as outdated.

@melinath melinath left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for enabling a few tests! It looks like there are now a large number of failures.

Three of the AgentGateway tests are now failing with "Inconsistent dependency lock file" - see https://googlecloudplatform.github.io/magic-modules/test/run-tests/#error-inconsistent-dependency-lock-file

The final test is failing with: Error code 3, message: Config validation failed.

versions:
- name: 'beta'
base_url: 'https://networkservices.googleapis.com/v1/'
base_url: 'https://networkservices.googleapis.com/v1beta1/'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance this is causing all the other test failures? Terraform expects that beta APIs will be a strict superset of GA APIs; if that's not true of this API for all resources, that could explain it.

(If this is the problem, we'll need to discuss potential solutions.)

@github-actions github-actions Bot requested a review from melinath May 29, 2026 18:18
@JamesDuncanNz JamesDuncanNz marked this pull request as draft May 29, 2026 18:28
@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@JamesDuncanNz JamesDuncanNz force-pushed the agentgateway-add-dns-peering branch from 7d33697 to 14a45d4 Compare June 1, 2026 17:26
@modular-magician

This comment was marked as outdated.

@JamesDuncanNz JamesDuncanNz force-pushed the agentgateway-add-dns-peering branch from 14a45d4 to 357c429 Compare June 12, 2026 14:43
@modular-magician

modular-magician commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 357c429:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 4 files changed, 215 insertions(+), 13 deletions(-)
google-beta provider View Diff 4 files changed, 215 insertions(+), 13 deletions(-)
terraform-google-conversion View Diff 1 file changed, 55 insertions(+)

Test report

Analytics

Total Tests Passed Skipped Affected
101 98 2 1
Affected Service Packages
  • networkservices

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccNetworkServicesAgentGateway_networkServicesAgentGatewayFullExample

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccNetworkServicesAgentGateway_networkServicesAgentGatewayFullExample

🟢 All tests passed!

View the recording VCR build log or the debug logs folder for detailed results.

@JamesDuncanNz, @melinath VCR tests complete for 357c429!

@JamesDuncanNz JamesDuncanNz marked this pull request as ready for review June 12, 2026 15:01

@melinath melinath left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - looks like #17860 promoted the resource to GA (which avoids the problems with the beta API) and enabled the tests, so this is just adding the new field & adding tests for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants