-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Bug]: secondary_private_ip_address_count causes NAT Gateway replacement #33964
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
It appears the 'ForceNew: true' option on the 'secondary_ip_address_count' is needed as that value is additive. Example: if that input was set to 2, and then you change it to 3, the computed value becomes 5. The 'secondary_ip_address_count' value needs to be ignored unless explicitly set. |
secondary_private_ip_address_count - (Optional) [Private NAT Gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT Gateway. Why does it appear at all on a public NAT Gateway. |
Terraform Core Version
0.13.21
AWS Provider Version
5.21.0
Affected Resource(s)
aws_nat_gateway
Expected Behavior
Changing secondary IPs should not cause the affected NAT gateway to be replaced.
Actual Behavior
The NAT gateway is marked to be replaced with the
secondary_private_ip_address_count
marked as the cause.Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
secondary_allocation_ids
argument with additional IPs to assign.Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
The resource works as expected if the
ForceNew: true
option is removed from https://github.com/hashicorp/terraform-provider-aws/blob/main/internal/service/ec2/vpc_nat_gateway.go#L89I'm unsure though if that option is required for some some reason. If it is as simple as that, I'd be happy to get a PR up.
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: