-
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
Fix aws dx gateway association proposal #19741
Fix aws dx gateway association proposal #19741
Conversation
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.
Welcome @dkujawski 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
Once the proposal has been accepted and deleted, locate the association, populate the proposal state to prevent recreating the proposal unnecessarily.
…posal needs to be recreated.
accept an import string composed of the proposal id, dx gateway id, and target associated gateway id when the proposal has been removed by AWS due to it being accepted.
move proposal existance logic out of custom diff function and over into the Read function. add more debug logs to track when proposal id values exist
…ociation_proposal acceptance tests.
…l ID is not blank.
2e480e7
to
e75ba1b
Compare
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 TEST=./aws TESTARGS='-run=TestAccAwsDxGateway_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAwsDxGateway_ -timeout 180m
=== RUN TestAccAwsDxGateway_basic
=== PAUSE TestAccAwsDxGateway_basic
=== RUN TestAccAwsDxGateway_disappears
=== PAUSE TestAccAwsDxGateway_disappears
=== RUN TestAccAwsDxGateway_complex
=== PAUSE TestAccAwsDxGateway_complex
=== CONT TestAccAwsDxGateway_basic
=== CONT TestAccAwsDxGateway_complex
=== CONT TestAccAwsDxGateway_disappears
--- PASS: TestAccAwsDxGateway_disappears (22.54s)
--- PASS: TestAccAwsDxGateway_basic (23.22s)
--- PASS: TestAccAwsDxGateway_complex (761.57s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 764.824s
% ACCTEST_PARALLELISM=2 make testacc TEST=./aws TESTARGS='-run=TestAccAwsDxGatewayAssociation_\|TestAccAwsDxGatewayAssociationProposal_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 2 -run=TestAccAwsDxGatewayAssociation_\|TestAccAwsDxGatewayAssociationProposal_ -timeout 180m
=== RUN TestAccAwsDxGatewayAssociationProposal_basicVpnGateway
=== PAUSE TestAccAwsDxGatewayAssociationProposal_basicVpnGateway
=== RUN TestAccAwsDxGatewayAssociationProposal_basicTransitGateway
=== PAUSE TestAccAwsDxGatewayAssociationProposal_basicTransitGateway
=== RUN TestAccAwsDxGatewayAssociationProposal_disappears
=== PAUSE TestAccAwsDxGatewayAssociationProposal_disappears
=== RUN TestAccAwsDxGatewayAssociationProposal_endOfLifeVpn
=== PAUSE TestAccAwsDxGatewayAssociationProposal_endOfLifeVpn
=== RUN TestAccAwsDxGatewayAssociationProposal_endOfLifeTgw
=== PAUSE TestAccAwsDxGatewayAssociationProposal_endOfLifeTgw
=== RUN TestAccAwsDxGatewayAssociationProposal_AllowedPrefixes
=== PAUSE TestAccAwsDxGatewayAssociationProposal_AllowedPrefixes
=== RUN TestAccAwsDxGatewayAssociation_V0StateUpgrade
=== PAUSE TestAccAwsDxGatewayAssociation_V0StateUpgrade
=== RUN TestAccAwsDxGatewayAssociation_basicVpnGatewaySingleAccount
=== PAUSE TestAccAwsDxGatewayAssociation_basicVpnGatewaySingleAccount
=== RUN TestAccAwsDxGatewayAssociation_basicVpnGatewayCrossAccount
=== PAUSE TestAccAwsDxGatewayAssociation_basicVpnGatewayCrossAccount
=== RUN TestAccAwsDxGatewayAssociation_basicTransitGatewaySingleAccount
=== PAUSE TestAccAwsDxGatewayAssociation_basicTransitGatewaySingleAccount
=== RUN TestAccAwsDxGatewayAssociation_basicTransitGatewayCrossAccount
=== PAUSE TestAccAwsDxGatewayAssociation_basicTransitGatewayCrossAccount
=== RUN TestAccAwsDxGatewayAssociation_multiVpnGatewaysSingleAccount
=== PAUSE TestAccAwsDxGatewayAssociation_multiVpnGatewaysSingleAccount
=== RUN TestAccAwsDxGatewayAssociation_allowedPrefixesVpnGatewaySingleAccount
=== PAUSE TestAccAwsDxGatewayAssociation_allowedPrefixesVpnGatewaySingleAccount
=== RUN TestAccAwsDxGatewayAssociation_allowedPrefixesVpnGatewayCrossAccount
=== PAUSE TestAccAwsDxGatewayAssociation_allowedPrefixesVpnGatewayCrossAccount
=== RUN TestAccAwsDxGatewayAssociation_recreateProposal
=== PAUSE TestAccAwsDxGatewayAssociation_recreateProposal
=== CONT TestAccAwsDxGatewayAssociationProposal_basicVpnGateway
=== CONT TestAccAwsDxGatewayAssociation_basicVpnGatewayCrossAccount
--- PASS: TestAccAwsDxGatewayAssociationProposal_basicVpnGateway (57.20s)
=== CONT TestAccAwsDxGatewayAssociation_allowedPrefixesVpnGatewaySingleAccount
--- PASS: TestAccAwsDxGatewayAssociation_allowedPrefixesVpnGatewaySingleAccount (1578.84s)
=== CONT TestAccAwsDxGatewayAssociation_recreateProposal
--- PASS: TestAccAwsDxGatewayAssociation_basicVpnGatewayCrossAccount (1755.63s)
=== CONT TestAccAwsDxGatewayAssociation_allowedPrefixesVpnGatewayCrossAccount
=== CONT TestAccAwsDxGatewayAssociation_recreateProposal
--- PASS: TestAccAwsDxGatewayAssociation_recreateProposal (2071.69s)
=== CONT TestAccAwsDxGatewayAssociation_basicTransitGatewayCrossAccount
--- PASS: TestAccAwsDxGatewayAssociation_allowedPrefixesVpnGatewayCrossAccount (1510.18s)
=== CONT TestAccAwsDxGatewayAssociation_multiVpnGatewaysSingleAccount
--- PASS: TestAccAwsDxGatewayAssociation_basicTransitGatewayCrossAccount (1271.75s)
=== CONT TestAccAwsDxGatewayAssociationProposal_endOfLifeTgw
--- PASS: TestAccAwsDxGatewayAssociation_multiVpnGatewaysSingleAccount (1152.73s)
=== CONT TestAccAwsDxGatewayAssociation_basicVpnGatewaySingleAccount
--- PASS: TestAccAwsDxGatewayAssociationProposal_endOfLifeTgw (1179.68s)
=== CONT TestAccAwsDxGatewayAssociation_V0StateUpgrade
--- PASS: TestAccAwsDxGatewayAssociation_basicVpnGatewaySingleAccount (1327.53s)
=== CONT TestAccAwsDxGatewayAssociationProposal_AllowedPrefixes
--- PASS: TestAccAwsDxGatewayAssociationProposal_AllowedPrefixes (86.29s)
=== CONT TestAccAwsDxGatewayAssociationProposal_disappears
--- PASS: TestAccAwsDxGatewayAssociationProposal_disappears (55.90s)
=== CONT TestAccAwsDxGatewayAssociationProposal_endOfLifeVpn
--- PASS: TestAccAwsDxGatewayAssociation_V0StateUpgrade (998.55s)
=== CONT TestAccAwsDxGatewayAssociation_basicTransitGatewaySingleAccount
--- PASS: TestAccAwsDxGatewayAssociationProposal_endOfLifeVpn (1183.03s)
=== CONT TestAccAwsDxGatewayAssociationProposal_basicTransitGateway
--- PASS: TestAccAwsDxGatewayAssociation_basicTransitGatewaySingleAccount (1160.12s)
--- PASS: TestAccAwsDxGatewayAssociationProposal_basicTransitGateway (207.98s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 7282.567s
Verified on a test Association Proposal that was EOLed by AWS. After initial
|
This functionality has been released in v3.50.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Closes #18608.
Output from acceptance testing:
Currently the
aws_dx_gateway_association_proposal
automatically gets deleted by AWS some time after the proposal is accepted by the dx gateway owner. Terraform sees this and wants to re-create the proposal, cascading into a proposal id change on the accepter.The fix here is to:
Pros:
Cons: