-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add autoNetworkTier to Router NAT #9379
add autoNetworkTier to Router NAT #9379
Conversation
Hello! I am a robot. It looks like you are a: Community Contributor @trodge, 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. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 2 files changed, 38 insertions(+)) Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_compute_router_nat" "primary" {
auto_network_tier = # value needed
}
|
Tests analyticsTotal tests: Action takenFound 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccComputeRouterNat_update|TestAccComputeRouterNat_basic|TestAccComputeRouterNat_removeLogConfig|TestAccDataSourceGoogleComputeRouterNat_basic |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need some way to handle the values the API returns for this field for existing resources.
The field value is derived from a setting on the project that the resource belongs to, so one option would be to try to look up that value and set it in an encoder when it's unspecified. However, I don't know of an easy way to get that information.
The alternative would be to use default_from_api: true
on this field, but that would mean that deleting this field from the configuration would preserve whatever the last value was even if the project-level default changed.
…er-to-cnat sync merge from upstream/main
Hello @trodge, I have been studying the first case and I think is somewhat doable. |
…er-to-cnat sync merge from main
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 2 files changed, 38 insertions(+)) Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_compute_router_nat" "primary" {
auto_network_tier = # value needed
}
|
Tests analyticsTotal tests: Action takenFound 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccComputeRouterNat_update|TestAccComputeRouterNat_removeLogConfig|TestAccComputeRouterNat_basic|TestAccDataSourceGoogleComputeRouterNat_basic |
|
Setting |
…er-to-cnat sync merge from upstream/main
Helllo @trodge I tried to implement your encoder fix so it will take the project default when empty. Could you take a look, please? |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 2 files changed, 69 insertions(+)) Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_compute_router_nat" "primary" {
auto_network_tier = # value needed
}
|
Tests analyticsTotal tests: Click here to see the affected service packages
Action takenFound 13 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccComputeRouterNat_withPrivateNat|TestAccComputeRouterNat_AutoNetworkTier|TestAccComputeRouterNat_withManualIpAndSubnetConfiguration|TestAccComputeRouterNat_withNatRules|TestAccComputeRouterNat_withPortAllocationMethods|TestAccComputeRouterNat_withNatIpsAndDrainNatIps|TestAccDataSourceGoogleComputeRouterNat_basic|TestAccComputeRouterNat_withPrivateNatAndEmptyActionActiveRanges|TestAccComputeRouterNat_update|TestAccComputeRouterNat_removeLogConfig|TestAccComputeRouterNat_withPrivateNatAndEmptyAction|TestAccComputeRouterNat_basic|TestAccComputeRouterNat_withPrivateNatAndRules |
Rerun these tests in REPLAYING mode to catch issues
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_compute_router_nat" "primary" {
auto_network_tier = # value needed
}
|
Tests analyticsTotal tests: Click here to see the affected service packages
Action takenFound 8 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccComputeRegionPerInstanceConfig_removeInstanceOnDestroy|TestAccComputeRouterNat_AutoNetworkTier|TestAccComputeRouterNat_withManualIpAndSubnetConfiguration|TestAccComputeRouterNat_withNatIpsAndDrainNatIps|TestAccComputeRouterNat_withNatRules|TestAccComputeRouterNat_withPortAllocationMethods|TestAccComputeRouterNat_withPrivateNat|TestAccComputeRouterNat_withPrivateNatAndRules |
|
/gcbrun |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like testAccComputeRouterNatBaseResourcesWithPrivateNatSubnetworks
was moved inside <% unless version == "ga" -%>
guards, making it beta only. To get this to compile you'll need to move that function outside the beta-only guard.
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_compute_router_nat" "primary" {
auto_network_tier = # value needed
}
|
Tests analyticsTotal tests: Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccComputeRegionPerInstanceConfig_removeInstanceOnDestroy |
|
…er-to-cnat sync merge from upstream/main
Hello @trodge thanks for the feedback. I applied your suggestions and moved the function. This should be fixing it, but if fails on the ga-provider I will make a separate one |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_compute_router_nat" "primary" {
auto_network_tier = # value needed
}
|
Tests analyticsTotal tests: Click here to see the affected service packages
|
Fixes: hashicorp/terraform-provider-google#16139
It adds support to set the network tier to use when automatically reserving NAT IP Addresses
If this PR is for Terraform, I acknowledge that I have:
make test
andmake lint
in the generated providers to ensure it passes unit and linter tests.Release Note Template for Downstream PRs (will be copied)