Skip to content
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

resource/aws_ec2_transit_gateway: Add retry on DirectConnect Attachments error #8752

Merged
merged 1 commit into from
May 23, 2019

Conversation

nywilken
Copy link
Contributor

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Fixes #0000

Release note for CHANGELOG:

resource/aws_ec2_transit_gateway: Handle deletion of transit gateways with DirectConnect Attachments

This changes is a pre-cursor to handling the errors being reported in PR #8528

Error: Error applying plan:

1 error(s) occurred:

* aws_ec2_transit_gateway.example (destroy): 1 error(s) occurred:

* aws_ec2_transit_gateway.example: error deleting EC2 Transit Gateway: IncorrectState: tgw-06798ed9bb08bff87 has non-deleted DirectConnect Gateway Attachments: tgw-attach-0a09d082b320ed0bc.
        status code: 400, request id: 74871073-97a5-4b5d-b031-dbeb6da1ee93

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

Output from acceptance testing:

--- PASS: TestAccAWSEc2TransitGateway_DefaultRouteTableAssociationAndPropagationDisabled (137.88s)
--- PASS: TestAccAWSEc2TransitGateway_disappears (184.68s)
--- PASS: TestAccAWSEc2TransitGateway_Tags (190.95s)
--- PASS: TestAccAWSEc2TransitGateway_basic (231.65s)
--- PASS: TestAccAWSEc2TransitGateway_VpnEcmpSupport (308.26s)
--- PASS: TestAccAWSEc2TransitGateway_AutoAcceptSharedAttachments (317.92s)
--- PASS: TestAccAWSEc2TransitGateway_DefaultRouteTablePropagation (349.14s)
--- PASS: TestAccAWSEc2TransitGateway_Description (349.24s)
--- PASS: TestAccAWSEc2TransitGateway_AmazonSideASN (349.39s)
--- PASS: TestAccAWSEc2TransitGateway_DefaultRouteTableAssociation (349.59s)
--- PASS: TestAccAWSEc2TransitGateway_DnsSupport (371.45s)

…nts error

This changes is a pre-cursor to handling the errors being reported in PR #8528
```
Error: Error applying plan:

1 error(s) occurred:

* aws_ec2_transit_gateway.example (destroy): 1 error(s) occurred:

* aws_ec2_transit_gateway.example: error deleting EC2 Transit Gateway: IncorrectState: tgw-06798ed9bb08bff87 has non-deleted DirectConnect Gateway Attachments: tgw-attach-0a09d082b320ed0bc.
        status code: 400, request id: 74871073-97a5-4b5d-b031-dbeb6da1ee93

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
```

Acceptance tests after change
```
--- PASS: TestAccAWSEc2TransitGateway_DefaultRouteTableAssociationAndPropagationDisabled (137.88s)
--- PASS: TestAccAWSEc2TransitGateway_disappears (184.68s)
--- PASS: TestAccAWSEc2TransitGateway_Tags (190.95s)
--- PASS: TestAccAWSEc2TransitGateway_basic (231.65s)
--- PASS: TestAccAWSEc2TransitGateway_VpnEcmpSupport (308.26s)
--- PASS: TestAccAWSEc2TransitGateway_AutoAcceptSharedAttachments (317.92s)
--- PASS: TestAccAWSEc2TransitGateway_DefaultRouteTablePropagation (349.14s)
--- PASS: TestAccAWSEc2TransitGateway_Description (349.24s)
--- PASS: TestAccAWSEc2TransitGateway_AmazonSideASN (349.39s)
--- PASS: TestAccAWSEc2TransitGateway_DefaultRouteTableAssociation (349.59s)
--- PASS: TestAccAWSEc2TransitGateway_DnsSupport (371.45s)
```
@ghost ghost added size/XS Managed by automation to categorize the size of a PR. service/ec2 Issues and PRs that pertain to the ec2 service. labels May 23, 2019
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@bflad bflad added this to the v2.12.0 milestone May 23, 2019
@nywilken nywilken merged commit 47f8d35 into master May 23, 2019
@nywilken nywilken deleted the f-aws_ec2_transit_gateway-dx-attachments branch May 23, 2019 17:29
nywilken added a commit that referenced this pull request May 23, 2019
@bflad
Copy link
Contributor

bflad commented May 24, 2019

This has been released in version 2.12.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Mar 29, 2020

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.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/ec2 Issues and PRs that pertain to the ec2 service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants