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

tests/resource/aws_dx_gateway_association: Occasional Timeout Errors on Destroy #15164

Closed
bflad opened this issue Sep 15, 2020 · 4 comments · Fixed by #15201
Closed

tests/resource/aws_dx_gateway_association: Occasional Timeout Errors on Destroy #15164

bflad opened this issue Sep 15, 2020 · 4 comments · Fixed by #15201
Assignees
Labels
service/directconnect Issues and PRs that pertain to the directconnect service. service/ec2 Issues and PRs that pertain to the ec2 service. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Milestone

Comments

@bflad
Copy link
Contributor

bflad commented Sep 15, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Occasionally we will see test failures like the following:

=== CONT  TestAccAwsDxGatewayAssociation_allowedPrefixesVpnGatewayCrossAccount
TestAccAwsDxGatewayAssociation_allowedPrefixesVpnGatewayCrossAccount: resource_aws_dx_gateway_association_test.go:439: [INFO] Got non-empty plan, as expected
TestAccAwsDxGatewayAssociation_allowedPrefixesVpnGatewayCrossAccount: testing_new.go:22: WARNING: destroy failed, so remote objects may still exist and be subject to billing
TestAccAwsDxGatewayAssociation_allowedPrefixesVpnGatewayCrossAccount: testing_new.go:22: failed to destroy: terraform failed: exit status 1
stderr:
Error: Error waiting for VPN Gateway "vgw-03536ea6e83370462" to detach from VPC "vpc-0eb7ce1912697a59d": timeout while waiting for state to become 'detached' (last state: 'detaching', timeout: 15m0s)
--- FAIL: TestAccAwsDxGatewayAssociation_allowedPrefixesVpnGatewayCrossAccount (3066.89s)

=== CONT  TestAccAwsDxGatewayAssociation_allowedPrefixesVpnGatewaySingleAccount
TestAccAwsDxGatewayAssociation_allowedPrefixesVpnGatewaySingleAccount: testing_new.go:22: WARNING: destroy failed, so remote objects may still exist and be subject to billing
TestAccAwsDxGatewayAssociation_allowedPrefixesVpnGatewaySingleAccount: testing_new.go:22: failed to destroy: terraform failed: exit status 1
stderr:
Error: Error waiting for VPN Gateway "vgw-0e233bbbd69ea10fb" to detach from VPC "vpc-0d46b03aca616bf1b": timeout while waiting for state to become 'detached' (last state: 'detaching', timeout: 15m0s)
--- FAIL: TestAccAwsDxGatewayAssociation_allowedPrefixesVpnGatewaySingleAccount (3082.51s)

This would either suggest we need to increase the default detachment timeout and/or we can potentially remove the separate aws_vpn_gateway_attachment resource usage to see if it changes anything.

Affected Resource(s)

  • aws_dx_gateway_association

Potential Terraform Configuration

resource "aws_vpn_gateway" "test" {
  vpc_id = aws_vpc.test.id

  tags = {
    Name = %[1]q
  }
}
@bflad bflad added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/directconnect Issues and PRs that pertain to the directconnect service. technical-debt Addresses areas of the codebase that need refactoring or redesign. labels Sep 15, 2020
@bflad bflad added this to the Roadmap milestone Sep 15, 2020
@ghost ghost added the service/ec2 Issues and PRs that pertain to the ec2 service. label Sep 15, 2020
@ewbankkit
Copy link
Contributor

Looking at the code, removing the aws_vpn_gateway_attachment resource and specifying vpc_id on the aws_vpn_gateway resource will potentially make the error occur more frequently as the aws_vpn_gateway resource has its own detachment implementation that has a 10 minute timeout 😄.

@bflad
Copy link
Contributor Author

bflad commented Sep 16, 2020

Getting both resources to a shared timeout constant in aws/internal/service/ec2/waiter would be nice. 👍

@ghost
Copy link

ghost commented Sep 24, 2020

This has been released in version 3.8.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 for triage. Thanks!

@ghost
Copy link

ghost commented Oct 18, 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 as resolved and limited conversation to collaborators Oct 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/directconnect Issues and PRs that pertain to the directconnect service. service/ec2 Issues and PRs that pertain to the ec2 service. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
2 participants