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_route: Trigger resource recreation with deleted/deleting route state #6817

Merged
merged 1 commit into from
Dec 12, 2018

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Dec 12, 2018

Another pull request in the series to reduce flakey/failing tests before our next major version development.

Presumably the EC2 API previously omitted the route when deleted and now uses the deleted/deleting route states. This also fixes the error codes to ignore during deletion as seen below.

Previous output from acceptance testing:

--- FAIL: TestAccAWSEc2TransitGatewayRoute_disappears (136.87s)
    testing.go:538: Step 0 error: Expected a non-empty plan, but got an empty plan!
    testing.go:599: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: Error applying: 1 error occurred:
        	* aws_ec2_transit_gateway_route.test (destroy): 1 error occurred:
        	* aws_ec2_transit_gateway_route.test: error deleting EC2 Transit Gateway Route: InvalidRoute.NotFound: Route 0.0.0.0/0 does not exists in Transit Gateway Route Table tgw-rtb-01fbb8db01f13c7b8.
        	status code: 400, request id: a1aaf6ae-dc4f-4e4e-b0f5-a5d59b582c11

Output from acceptance testing:

--- PASS: TestAccAWSEc2TransitGatewayRoute_basic (285.46s)
--- PASS: TestAccAWSEc2TransitGatewayRoute_disappears (285.83s)

…ith deleted/deleting state routes

Presumably the EC2 API previously omitted the route when deleted and now uses the deleted/deleting route states. Also fixes the error codes to ignore during deletion.

Previous output from acceptance testing:

```
--- FAIL: TestAccAWSEc2TransitGatewayRoute_disappears (136.87s)
    testing.go:538: Step 0 error: Expected a non-empty plan, but got an empty plan!
    testing.go:599: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: Error applying: 1 error occurred:
        	* aws_ec2_transit_gateway_route.test (destroy): 1 error occurred:
        	* aws_ec2_transit_gateway_route.test: error deleting EC2 Transit Gateway Route: InvalidRoute.NotFound: Route 0.0.0.0/0 does not exists in Transit Gateway Route Table tgw-rtb-01fbb8db01f13c7b8.
        	status code: 400, request id: a1aaf6ae-dc4f-4e4e-b0f5-a5d59b582c11
```

Output from acceptance testing:

```
--- PASS: TestAccAWSEc2TransitGatewayRoute_basic (285.46s)
--- PASS: TestAccAWSEc2TransitGatewayRoute_disappears (285.83s)
```
@bflad bflad added bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service. labels Dec 12, 2018
@bflad bflad requested a review from a team December 12, 2018 07:49
@ghost ghost added the size/XS Managed by automation to categorize the size of a PR. label Dec 12, 2018
Copy link
Member

@mbfrahry mbfrahry 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 v1.52.0 milestone Dec 12, 2018
@bflad bflad merged commit 5fcc203 into master Dec 12, 2018
@bflad bflad deleted the b-aws_ec2_transit_gateway_route-disappears branch December 12, 2018 18:52
bflad added a commit that referenced this pull request Dec 12, 2018
@bflad
Copy link
Contributor Author

bflad commented Dec 13, 2018

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

@ghost
Copy link

ghost commented Apr 1, 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 Apr 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. 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