-
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
resource/aws_dynamodb_table: Skip ResourceNotFoundException during deletion #11692
Conversation
…letion Previously in the acceptance testing: ``` --- FAIL: TestAccAWSDynamoDbGlobalTable_multipleRegions (67.39s) testing.go:701: Error destroying resource! WARNING: Dangling resources may exist. The full state and error is shown below. Error: errors during apply: error deleting DynamoDB Table (tf-acc-test-tyuvv): Error deleting DynamoDB table: ResourceNotFoundException: Requested resource not found: Table: tf-acc-test-tyuvv not found ``` The prior code would wrap the `awserr.Error` in a `fmt.Errorf()` which meant the error was returned by value. The calling code already handles the error message context, so we remove the error wrapping so consumers can work with the AWS error type correctly. Another solution here would be instead using the Go 1.13 `%w` format verb, which will be part of a future linting check. Output from acceptance testing: ``` --- PASS: TestAccAWSDynamoDbGlobalTable_basic (86.21s) --- PASS: TestAccAWSDynamoDbGlobalTable_multipleRegions (106.17s) --- PASS: TestAccAWSDynamoDbTable_attributeUpdate (463.78s) --- PASS: TestAccAWSDynamoDbTable_attributeUpdateValidation (6.14s) --- PASS: TestAccAWSDynamoDbTable_basic (27.57s) --- PASS: TestAccAWSDynamoDbTable_BillingMode_GSI_PayPerRequestToProvisioned (57.72s) --- PASS: TestAccAWSDynamoDbTable_BillingMode_GSI_ProvisionedToPayPerRequest (1149.43s) --- PASS: TestAccAWSDynamoDbTable_BillingMode_PayPerRequestToProvisioned (45.62s) --- PASS: TestAccAWSDynamoDbTable_BillingMode_ProvisionedToPayPerRequest (1325.53s) --- PASS: TestAccAWSDynamoDbTable_disappears (19.40s) --- PASS: TestAccAWSDynamoDbTable_disappears_PayPerRequestWithGSI (100.90s) --- PASS: TestAccAWSDynamoDbTable_enablePitr (133.02s) --- PASS: TestAccAWSDynamoDbTable_encryption (62.77s) --- PASS: TestAccAWSDynamoDbTable_extended (195.41s) --- PASS: TestAccAWSDynamoDbTable_gsiUpdateCapacity (56.73s) --- PASS: TestAccAWSDynamoDbTable_gsiUpdateNonKeyAttributes (157.72s) --- PASS: TestAccAWSDynamoDbTable_gsiUpdateOtherAttributes (465.18s) --- PASS: TestAccAWSDynamoDbTable_streamSpecification (67.08s) --- PASS: TestAccAWSDynamoDbTable_streamSpecificationValidation (4.85s) --- PASS: TestAccAWSDynamoDbTable_tags (36.51s) --- PASS: TestAccAWSDynamoDbTable_Ttl_Disabled (41.27s) --- PASS: TestAccAWSDynamoDbTable_Ttl_Enabled (29.97s) ```
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.48.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:
The prior code would wrap the
awserr.Error
in afmt.Errorf()
which meant the error was returned by value. The calling code already handles the error message context, so we remove the error wrapping so consumers can work with the AWS error type correctly. Another solution here would be instead using the Go 1.13%w
format verb, which will be part of a future linting check.Output from acceptance testing: