-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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] Fix issues related to secondary EIPs and Private IPs being updated #41403
Open
drewtul
wants to merge
12
commits into
hashicorp:main
Choose a base branch
from
drewtul:bug-nat-gateway-secondary-ips
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+171
−45
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…eded' in first wait call
…c to resourceNATGatewayCustomizeDiff.. Update tests to ensure NatGateways it not recreated, fix issus rising from this with secondary_private_ip_addresses not being NewComputed when secondary_allocation_ids is changed.
…to bug-nat-gateway-secondary-ips
Community NoteVoting for Prioritization
For Submitters
|
ewbankkit
approved these changes
Feb 25, 2025
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.
LGTM 🚀.
% make testacc TESTARGS='-run=TestAccVPCNATGateway_' PKG=ec2 ACCTEST_PARALLELISM=3
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.5 test ./internal/service/ec2/... -v -count 1 -parallel 3 -run=TestAccVPCNATGateway_ -timeout 360m -vet=off
2025/02/25 15:58:21 Initializing Terraform AWS Provider...
=== RUN TestAccVPCNATGateway_basic
=== PAUSE TestAccVPCNATGateway_basic
=== RUN TestAccVPCNATGateway_disappears
=== PAUSE TestAccVPCNATGateway_disappears
=== RUN TestAccVPCNATGateway_ConnectivityType_private
=== PAUSE TestAccVPCNATGateway_ConnectivityType_private
=== RUN TestAccVPCNATGateway_privateIP
=== PAUSE TestAccVPCNATGateway_privateIP
=== RUN TestAccVPCNATGateway_tags
=== PAUSE TestAccVPCNATGateway_tags
=== RUN TestAccVPCNATGateway_secondaryAllocationIDs
=== PAUSE TestAccVPCNATGateway_secondaryAllocationIDs
=== RUN TestAccVPCNATGateway_secondaryPrivateIPAddressCount
=== PAUSE TestAccVPCNATGateway_secondaryPrivateIPAddressCount
=== RUN TestAccVPCNATGateway_secondaryPrivateIPAddressCountToSpecific
=== PAUSE TestAccVPCNATGateway_secondaryPrivateIPAddressCountToSpecific
=== RUN TestAccVPCNATGateway_secondaryPrivateIPAddresses
=== PAUSE TestAccVPCNATGateway_secondaryPrivateIPAddresses
=== RUN TestAccVPCNATGateway_SecondaryPrivateIPAddresses_private
=== PAUSE TestAccVPCNATGateway_SecondaryPrivateIPAddresses_private
=== CONT TestAccVPCNATGateway_basic
=== CONT TestAccVPCNATGateway_secondaryAllocationIDs
=== CONT TestAccVPCNATGateway_privateIP
--- PASS: TestAccVPCNATGateway_privateIP (156.82s)
=== CONT TestAccVPCNATGateway_secondaryPrivateIPAddresses
--- PASS: TestAccVPCNATGateway_basic (186.53s)
=== CONT TestAccVPCNATGateway_SecondaryPrivateIPAddresses_private
--- PASS: TestAccVPCNATGateway_secondaryAllocationIDs (602.29s)
=== CONT TestAccVPCNATGateway_ConnectivityType_private
--- PASS: TestAccVPCNATGateway_secondaryPrivateIPAddresses (565.47s)
=== CONT TestAccVPCNATGateway_tags
--- PASS: TestAccVPCNATGateway_SecondaryPrivateIPAddresses_private (581.84s)
=== CONT TestAccVPCNATGateway_disappears
--- PASS: TestAccVPCNATGateway_ConnectivityType_private (176.49s)
=== CONT TestAccVPCNATGateway_secondaryPrivateIPAddressCountToSpecific
--- PASS: TestAccVPCNATGateway_tags (190.78s)
=== CONT TestAccVPCNATGateway_secondaryPrivateIPAddressCount
--- PASS: TestAccVPCNATGateway_disappears (155.46s)
--- PASS: TestAccVPCNATGateway_secondaryPrivateIPAddressCount (195.30s)
--- PASS: TestAccVPCNATGateway_secondaryPrivateIPAddressCountToSpecific (418.86s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 1203.534s
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Addresses a defect in current functionality.
partner
Contribution from a partner.
prioritized
Part of the maintainer teams immediate focus. To be addressed within the current quarter.
service/vpc
Issues and PRs that pertain to the vpc service.
tests
PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently updating the EIP associations for a NAT Gateway causes a replacement, which is not required.
This removes
ForceNew
fromsecondary_private_ip_address_count
and fixes issues allowing EIPs to be updated without recreating the resource which affects network connectivity for the duration.Also makes it possible to move from
secondary_private_ip_address_count
being specified to specifying exact IPs insecondary_private_ip_addresses
allowing users to increase from their initial number of private ips for a private NAT gateway.Relations
Closes #33964.
Closes #34268.
Closes #36360.
References
Output from Acceptance Testing