-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Dynamic Port Allocation silently fails to disable on Cloud NAT Gateways #13204
Dynamic Port Allocation silently fails to disable on Cloud NAT Gateways #13204
Comments
I suspect this PATCH request from the debug outputs is wrong. I'd expect to see Lines ---[ REQUEST ]---------------------------------------
PATCH /compute/v1/projects/redacted/regions/us-west1/routers/bobdanek-test?alt=json HTTP/1.1
Host: compute.googleapis.com
User-Agent: Terraform/1.1.7 (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google/dev
Content-Length: 447
Content-Type: application/json
Accept-Encoding: gzip
{
"nats": [
{
"drainNatIps": [],
"enableDynamicPortAllocation": true,
"enableEndpointIndependentMapping": false,
"endpointTypes": [
"ENDPOINT_TYPE_VM"
],
"icmpIdleTimeoutSec": 30,
"logConfig": null,
"minPortsPerVm": 1024,
"name": "bobdanek-test",
"natIpAllocateOption": "AUTO_ONLY",
"natIps": [],
"sourceSubnetworkIpRangesToNat": "ALL_SUBNETWORKS_ALL_IP_RANGES",
"subnetworks": [],
"tcpEstablishedIdleTimeoutSec": 1200,
"tcpTransitoryIdleTimeoutSec": 30,
"udpIdleTimeoutSec": 30
}
]
} I also see at the end of 2022-12-08T21:42:15.500Z [WARN] Provider "provider[\"registry.terraform.io/hashicorp/google\"]" produced an unexpected new value for google_compute_router_nat.bobdanek-test, but we are tolerating it because it is using the legacy plugin SDK.
The following problems may be the cause of any confusing errors from downstream operations:
- .enable_dynamic_port_allocation: was cty.False, but now cty.True |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
Affected Resource(s)
Terraform Configuration Files
Apply 1, to create test resources
Apply 2, to enable dynamic port allocation
Apply 3, to disable dynamic port allocation
Debug Output
3 files attached here, all encrypted with Hashicorp's public GPG key:
encrypted-apply-1.log
encrypted-apply-2.log
encrypted-apply-3.log
Panic Output
None.
Expected Behavior
Applying after changing
enable_dynamic_port_allocation
fromtrue
tofalse
disables dynamic port allocation on the cloud NAT gatewayActual Behavior
Terraform reports successfully applying the change from
true
tofalse
, but dynamic port allocation is still enabledSteps to Reproduce
terraform apply
the "Apply 1" code above to create the test resources, including the cloud NAT gateway with DPA (dynamic port allocation) disabledterraform apply
the "Apply 2" code above to switch DPA to enabled on the cloud NAT gatewayterraform apply
the "Apply 3" code above to switch DPA back to disabled on the cloud NAT gatewayfalse
Important Factoids
Nothing out of the ordinary as far as I can tell.
Skipping the first apply and creating the NAT gateway with DPA enabled initially may produce the same results, but I took the extra step in case there's anything useful in the debug logs when initially having it disabled.
References
The text was updated successfully, but these errors were encountered: