Skip to content

Conversation

@matheusaleixo-cit
Copy link
Contributor

@matheusaleixo-cit matheusaleixo-cit commented Apr 2, 2025

Adds sourceSubnetworkIpRangesToNat64 and nat64Subnetwork fields to compute RouterNat, allowing the support for public Router NAT services with NAT64 enabled.

Also adds dns64Config field to dns Policy, allowing the configuration of DNS64 server policies, required when using NAT64.

Fixes: #22116

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

compute: added `source_subnetwork_ip_ranges_to_nat64` and `nat64_subnetwork` fields  to `google_compute_router_nat` resource
dns: added `dns64_config` field  to `google_dns_policy` resource

… compute RouterNat;

- Added dns64Config field to dns Policy;
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Apr 2, 2025
@matheusaleixo-cit matheusaleixo-cit marked this pull request as ready for review April 3, 2025 12:24
@github-actions github-actions bot requested a review from rileykarson April 3, 2025 12:25
@github-actions
Copy link

github-actions bot commented Apr 3, 2025

Hello! I am a robot. Tests will require approval from a repository maintainer to run. Googlers: see go/terraform-auto-test-runs to set up automatic test runs.

@rileykarson, 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 modular-magician added service/cloud-dns service/compute-nat and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Apr 3, 2025
@modular-magician
Copy link
Collaborator

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

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 5 files changed, 208 insertions(+))
google-beta provider: Diff ( 8 files changed, 515 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 48 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1208
Passed tests: 1106
Skipped tests: 80
Affected tests: 22

Click here to see the affected service packages
  • compute
  • dns

Action taken

Found 22 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccComputeRouterNatAddress_withAddressCountDecrease
  • TestAccComputeRouterNatAddress_withAddressRemoved
  • TestAccComputeRouterNatAddress_withAutoAllocateAndAddressRemoved
  • TestAccComputeRouterNatAddress_withNatIpsAndDrainNatIps
  • TestAccComputeRouterNat_AutoNetworkTier
  • TestAccComputeRouterNat_basic
  • TestAccComputeRouterNat_update
  • TestAccComputeRouterNat_withAddressCountDecrease
  • TestAccComputeRouterNat_withEndpointTypes
  • TestAccComputeRouterNat_withManualIpAndSubnetConfiguration
  • TestAccComputeRouterNat_withNat64Configuration
  • TestAccComputeRouterNat_withNatIpsAndDrainNatIps
  • TestAccComputeRouterNat_withNatRules
  • TestAccComputeRouterNat_withPortAllocationMethods
  • TestAccComputeRouterNat_withPrivateNat
  • TestAccComputeRouterNat_withPrivateNatAndEmptyAction
  • TestAccComputeRouterNat_withPrivateNatAndEmptyActionActiveRanges
  • TestAccComputeRouterNat_withPrivateNatAndRules
  • TestAccDataSourceGoogleComputeRouterNat_basic
  • TestAccDNSPolicy_dnsPolicyDns64
  • TestAccDNSPolicy_dnsPolicyMultiprojectExample
  • TestAccDNSRecordSet_routingPolicy

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccComputeRouterNatAddress_withAddressCountDecrease [Debug log]
TestAccComputeRouterNatAddress_withAddressRemoved [Debug log]
TestAccComputeRouterNatAddress_withAutoAllocateAndAddressRemoved [Debug log]
TestAccComputeRouterNatAddress_withNatIpsAndDrainNatIps [Debug log]
TestAccComputeRouterNat_AutoNetworkTier [Debug log]
TestAccComputeRouterNat_basic [Debug log]
TestAccComputeRouterNat_update [Debug log]
TestAccComputeRouterNat_withAddressCountDecrease [Debug log]
TestAccComputeRouterNat_withEndpointTypes [Debug log]
TestAccComputeRouterNat_withManualIpAndSubnetConfiguration [Debug log]
TestAccComputeRouterNat_withNat64Configuration [Debug log]
TestAccComputeRouterNat_withNatIpsAndDrainNatIps [Debug log]
TestAccComputeRouterNat_withNatRules [Debug log]
TestAccComputeRouterNat_withPortAllocationMethods [Debug log]
TestAccComputeRouterNat_withPrivateNat [Debug log]
TestAccComputeRouterNat_withPrivateNatAndEmptyAction [Debug log]
TestAccComputeRouterNat_withPrivateNatAndEmptyActionActiveRanges [Debug log]
TestAccComputeRouterNat_withPrivateNatAndRules [Debug log]
TestAccDNSPolicy_dnsPolicyDns64 [Debug log]
TestAccDataSourceGoogleComputeRouterNat_basic [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccDNSPolicy_dnsPolicyMultiprojectExample [Error message] [Debug log]
TestAccDNSRecordSet_routingPolicy [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test


acctest.VcrTest(t, resource.TestCase{
PreCheck: func() { acctest.AccTestPreCheck(t) },
ProtoV5ProviderFactories: acctest.ProtoV5ProviderBetaFactories(t),
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ProtoV5ProviderFactories: acctest.ProtoV5ProviderBetaFactories(t),
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),

& remove google-beta from test configs- the implicit google provider will be the beta provider inside these tests. We only use the specific beta factory for example tests so the docs use the beta provider!

- Removed google-beta provider usage in Nat64Config test;
@github-actions github-actions bot requested a review from rileykarson April 4, 2025 20:10
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Apr 4, 2025
@github-actions
Copy link

github-actions bot commented Apr 9, 2025

@rileykarson This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

@github-actions
Copy link

@GoogleCloudPlatform/terraform-team @rileykarson This PR has been waiting for review for 1 week. Please take a look! Use the label disable-review-reminders to disable these notifications.

@github-actions
Copy link

@GoogleCloudPlatform/terraform-team @rileykarson This PR has been waiting for review for 2 weeks. Please take a look! Use the label disable-review-reminders to disable these notifications.

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Apr 23, 2025
@modular-magician
Copy link
Collaborator

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

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 5 files changed, 209 insertions(+))
google-beta provider: Diff ( 8 files changed, 504 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 48 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1224
Passed tests: 1139
Skipped tests: 85
Affected tests: 0

Click here to see the affected service packages
  • compute
  • dns

🟢 All tests passed!

View the build log

type: NestedObject
default_from_api: true
description: Configurations related to DNS64 for this Policy.
properties:
Copy link
Member

Choose a reason for hiding this comment

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

Should these subfields be required or would it be valid to write dns64_config {}? The configurations below seem like we could start w/ required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did some testing and using dns64_config {} causes a permadiff, so I guess we should set it as required.
Setting dns64_config { scope {} } seems to be functional when creating a new resource and when updating existing dns64_config values, so maybe we can keep allQueries as optional?

@github-actions github-actions bot requested a review from rileykarson April 25, 2025 20:45
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Apr 25, 2025
@github-actions
Copy link

@rileykarson This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

@github-actions
Copy link

github-actions bot commented May 2, 2025

@GoogleCloudPlatform/terraform-team @rileykarson This PR has been waiting for review for 1 week. Please take a look! Use the label disable-review-reminders to disable these notifications.

@github-actions
Copy link

github-actions bot commented May 9, 2025

@GoogleCloudPlatform/terraform-team @rileykarson This PR has been waiting for review for 2 weeks. Please take a look! Use the label disable-review-reminders to disable these notifications.

@github-actions
Copy link

@GoogleCloudPlatform/terraform-team @rileykarson This PR has been waiting for review for 3 weeks. Please take a look! Use the label disable-review-reminders to disable these notifications.

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label May 20, 2025
@modular-magician
Copy link
Collaborator

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

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 8 files changed, 546 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 8 files changed, 546 insertions(+), 1 deletion(-))
terraform-google-conversion: Diff ( 1 file changed, 48 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1247
Passed tests: 1162
Skipped tests: 84
Affected tests: 1

Click here to see the affected service packages
  • compute
  • dns

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
  • TestAccDNSPolicy_dnsPolicyDns64

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccDNSPolicy_dnsPolicyDns64 [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

@github-actions
Copy link

@GoogleCloudPlatform/terraform-team @rileykarson This PR has been waiting for review for 4 weeks. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link
Member

@rileykarson rileykarson left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@rileykarson rileykarson added this pull request to the merge queue May 29, 2025
Merged via the queue into GoogleCloudPlatform:main with commit 00ab640 May 29, 2025
27 checks passed
NandiniAgrawal15 pushed a commit to NandiniAgrawal15/magic-modules that referenced this pull request Jun 5, 2025
sahil-mahajan-google pushed a commit to sahil-mahajan-google/magic-modules that referenced this pull request Jun 6, 2025
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Jun 25, 2025
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Jun 25, 2025
jingqizz pushed a commit to jingqizz/magic-modules that referenced this pull request Jul 9, 2025
@matheusaleixo-cit matheusaleixo-cit deleted the add-new-nat64-support-for-compute-router-nat branch July 16, 2025 20:31
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Jul 28, 2025
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Jul 28, 2025
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Jul 28, 2025
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Jul 28, 2025
NandiniAgrawal15 pushed a commit to NandiniAgrawal15/magic-modules that referenced this pull request Sep 4, 2025
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.

Add Terraform support for configuring NAT64 for public Router NAT

3 participants