-
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
r/aws_internet_gateway(_attachment): Handle errors on delete for resources deleted out-of-band #40790
Conversation
% make testacc TESTARGS='-run=TestAccVPCInternetGateway_Disappears_attachment' PKG=ec2 make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.23.3 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run=TestAccVPCInternetGateway_Disappears_attachment -timeout 360m 2025/01/06 10:04:50 Initializing Terraform AWS Provider... === RUN TestAccVPCInternetGateway_Disappears_attachment === PAUSE TestAccVPCInternetGateway_Disappears_attachment === CONT TestAccVPCInternetGateway_Disappears_attachment vpc_internet_gateway_test.go:82: Error running post-test destroy, there may be dangling resources: exit status 1 Error: deleting EC2 Internet Gateway (igw-0682ac83f04b9fc1c): detaching EC2 Internet Gateway (igw-0682ac83f04b9fc1c) from VPC (vpc-0499f1f97a3a98aaf): operation error EC2: DetachInternetGateway, https response error StatusCode: 400, RequestID: f11d89d3-ac15-4001-946c-448a30112030, api error InvalidInternetGatewayID.NotFound: The internetGateway ID 'igw-0682ac83f04b9fc1c' does not exist --- FAIL: TestAccVPCInternetGateway_Disappears_attachment (16.09s) FAIL FAIL github.com/hashicorp/terraform-provider-aws/internal/service/ec2 21.891s FAIL make: *** [testacc] Error 1
% make testacc TESTARGS='-run=TestAccVPCInternetGatewayAttachment_Disappears_internetGateway' PKG=ec2 make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.23.3 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run=TestAccVPCInternetGatewayAttachment_Disappears_internetGateway -timeout 360m 2025/01/06 10:13:39 Initializing Terraform AWS Provider... === RUN TestAccVPCInternetGatewayAttachment_Disappears_internetGateway === PAUSE TestAccVPCInternetGatewayAttachment_Disappears_internetGateway === CONT TestAccVPCInternetGatewayAttachment_Disappears_internetGateway vpc_internet_gateway_attachment_test.go:84: Error running post-test destroy, there may be dangling resources: exit status 1 Error: deleting EC2 Internet Gateway Attachment (igw-0a6b48db0c404fcde:vpc-01e1cfd3e2b527c6a): detaching EC2 Internet Gateway (igw-0a6b48db0c404fcde) from VPC (vpc-01e1cfd3e2b527c6a): operation error EC2: DetachInternetGateway, https response error StatusCode: 400, RequestID: 638bd655-5821-4c72-90a7-9f5f49e21040, api error InvalidInternetGatewayID.NotFound: The internetGateway ID 'igw-0a6b48db0c404fcde' does not exist --- FAIL: TestAccVPCInternetGatewayAttachment_Disappears_internetGateway (14.83s) FAIL FAIL github.com/hashicorp/terraform-provider-aws/internal/service/ec2 20.663s FAIL make: *** [testacc] Error 1
…teway, ..., api error InvalidInternetGatewayID.NotFound: ...' errors on Delete.
…hInternetGateway, ..., api error InvalidInternetGatewayID.NotFound: ...' errors on Delete.
Community NoteVoting for Prioritization
For Submitters
|
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 PKG=ec2 TESTS="TestAccVPCInternetGatewayAttachment_|TestAccVPCInternetGateway_"
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCInternetGatewayAttachment_|TestAccVPCInternetGateway_' -timeout 360
--- PASS: TestAccVPCInternetGateway_disappears (16.19s)
--- PASS: TestAccVPCInternetGateway_basic (18.92s)
--- PASS: TestAccVPCInternetGatewayAttachment_disappears (20.37s)
--- PASS: TestAccVPCInternetGateway_Disappears_attachment (21.27s)
--- PASS: TestAccVPCInternetGatewayAttachment_Disappears_internetGateway (21.31s)
--- PASS: TestAccVPCInternetGatewayAttachment_basic (22.17s)
--- PASS: TestAccVPCInternetGateway_attachment (34.29s)
--- PASS: TestAccVPCInternetGateway_tags (35.97s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 41.630s
This functionality has been released in v5.83.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! |
Description
Ibid.
Relations
Closes #40788.
Output from Acceptance Testing