-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
service/ec2: Automatically retry on DetachVpnGateway calls receiving InvalidParameterValue: This call cannot be completed because there are pending VPNs or Virtual Interfaces
#11720
Conversation
…`InvalidParameterValue: This call cannot be completed because there are pending VPNs or Virtual Interfaces` Previously in the acceptance testing (inconsistently): ``` --- FAIL: TestAccAwsDxGateway_complex (1395.94s) testing.go:696: Error destroying resource! WARNING: Dangling resources may exist. The full state and error is shown below. Error: errors during apply: Error detaching VPN Gateway "vgw-0cdff63748b555ce1" from VPC "vpc-03b0d4f907a594a7e": InvalidParameterValue: This call cannot be completed because there are pending VPNs or Virtual Interfaces --- FAIL: TestAccAwsDxGatewayAssociation_basicVpnGatewaySingleAccount (753.92s) testing.go:696: Error destroying resource! WARNING: Dangling resources may exist. The full state and error is shown below. Error: errors during apply: Error detaching VPN Gateway "vgw-0347d6f94f7b41c56" from VPC "vpc-09e6a66d7f16b1df8": InvalidParameterValue: This call cannot be completed because there are pending VPNs or Virtual Interfaces --- FAIL: TestAccAwsDxGatewayAssociation_multiVpnGatewaysSingleAccount (1394.16s) testing.go:701: Error destroying resource! WARNING: Dangling resources may exist. The full state and error is shown below. Error: errors during apply: Error detaching VPN Gateway "vgw-0ff7518e32f5e9a41" from VPC "vpc-00285431f07f5bc9d": InvalidParameterValue: This call cannot be completed because there are pending VPNs or Virtual Interfaces ``` Example debug logging: ``` 2019/12/18 06:09:29 [DEBUG] [aws-sdk-go] DEBUG: Response ec2/DetachVpnGateway Details: ---[ RESPONSE ]-------------------------------------- HTTP/1.1 400 Bad Request Connection: close Transfer-Encoding: chunked Date: Wed, 18 Dec 2019 06:09:29 GMT Server: AmazonEC2 ----------------------------------------------------- 2019/12/18 06:09:29 [DEBUG] [aws-sdk-go] <?xml version="1.0" encoding="UTF-8"?> <Response><Errors><Error><Code>InvalidParameterValue</Code><Message>This call cannot be completed because there are pending VPNs or Virtual Interfaces</Message></Error></Errors><RequestID>f951ecbf-328e-4fe3-be78-f02e8902da90</RequestID></Response> 2019/12/18 06:09:29 [DEBUG] [aws-sdk-go] DEBUG: Validate Response ec2/DetachVpnGateway failed, attempt 0/25, error InvalidParameterValue: This call cannot be completed because there are pending VPNs or Virtual Interfaces status code: 400, request id: f951ecbf-328e-4fe3-be78-f02e8902da90 ``` Here we allow the retryable logic that applies to the `AttachVpnGateway` call to also apply to the `DetachVpnGateway` call. Output from acceptance testing: ``` --- PASS: TestAccAwsDxGateway_basic (75.94s) --- PASS: TestAccAwsDxGateway_complex (1442.22s) --- PASS: TestAccAwsDxGatewayAssociation_allowedPrefixesVpnGatewayCrossAccount (1741.64s) --- PASS: TestAccAwsDxGatewayAssociation_allowedPrefixesVpnGatewaySingleAccount (1561.21s) --- PASS: TestAccAwsDxGatewayAssociation_basicTransitGatewayCrossAccount (1067.31s) --- PASS: TestAccAwsDxGatewayAssociation_basicTransitGatewaySingleAccount (1064.09s) --- PASS: TestAccAwsDxGatewayAssociation_basicVpnGatewayCrossAccount (1135.38s) --- PASS: TestAccAwsDxGatewayAssociation_basicVpnGatewaySingleAccount (1164.79s) --- PASS: TestAccAwsDxGatewayAssociation_deprecatedSingleAccount (1450.04s) --- PASS: TestAccAwsDxGatewayAssociation_multiVpnGatewaysSingleAccount (1160.43s) --- PASS: TestAccAWSVpnGateway_basic (97.92s) --- PASS: TestAccAWSVpnGateway_delete (67.50s) --- PASS: TestAccAWSVpnGateway_disappears (56.04s) --- PASS: TestAccAWSVpnGateway_reattach (128.44s) --- PASS: TestAccAWSVpnGateway_tags (68.82s) --- PASS: TestAccAWSVpnGateway_withAmazonSideAsnSetToState (51.51s) --- PASS: TestAccAWSVpnGateway_withAvailabilityZoneSetToState (48.04s) --- PASS: TestAccAWSVpnGatewayAttachment_basic (50.52s) --- PASS: TestAccAWSVpnGatewayAttachment_deleted (63.85s) ```
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 👍
This has been released in version 2.53.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! |
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! |
Community Note
Release note for CHANGELOG:
Previously in the acceptance testing (inconsistently):
Example debug logging:
Here we allow the retryable logic that applies to the
AttachVpnGateway
call to also apply to theDetachVpnGateway
call.Output from acceptance testing: