-
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
[Bug]: DynamoDB table tagging failures due to API changes #39275
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
Acceptance tests for this resource are also now failing. Generated tagging logic will need to be updated to account for eventual consistency of the % make testacc PKG=dynamodb TESTS=TestAccDynamoDBTag_basic
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.6 test ./internal/service/dynamodb/... -v -count 1 -parallel 20 -run='TestAccDynamoDBTag_basic' -timeout 360m
=== RUN TestAccDynamoDBTag_basic
=== PAUSE TestAccDynamoDBTag_basic
=== CONT TestAccDynamoDBTag_basic
tag_test.go:22: Step 1/2 error: Error running apply: exit status 1
Error: reading dynamodb resource (arn:aws:dynamodb:us-west-2:727561393803:table/tf-acc-test-2687959590167797453) tag (key1): empty result
with aws_dynamodb_tag.test,
on terraform_plugin_test.tf line 28, in resource "aws_dynamodb_tag" "test":
28: resource "aws_dynamodb_tag" "test" {
--- FAIL: TestAccDynamoDBTag_basic (19.79s)
FAIL
FAIL github.com/hashicorp/terraform-provider-aws/internal/service/dynamodb 26.040s |
Warning This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them. Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed. |
This functionality has been released in v5.68.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! |
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. |
Terraform Core Version
1.9.5
AWS Provider Version
5.66.0
Affected Resource(s)
Expected Behavior
Adding or removing tags w/ aws_dynamodb_tag and aws_dynamodb_table should work without error.
Actual Behavior
Various errors including
Error: reading dynamodb resource (arn:aws:dynamodb:us-west-2:XXX:table/test) tag (t1): empty result
andSubscriberLimitExceeded
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
Apply the above terraform.
Around August 23, 2024, AWS changed TagResource and UntagResource APIs to be asynchronous / eventually consistent. Previously these API calls were blocking / strongly consistent. This causes at least two failure modes.
Applying the terraform included above exposes the first problem, failing with
Error: reading dynamodb resource
. After successfully calling TagResource, Terraform fails to read back the tag value. Presumably this is because the eventually consistent write has not yet applied, so the read comes back empty.A second problem also occurs but is masked by retries. AWS does not allow TagResource to be called until the previous asynchronous call has completed. When applying the three tags in the blueprint above, it results in three calls to TagResource. Some of these calls will fail with a
SubscriberLimitExceeded
error message but are eventually retried. You can see this by enabling DEBUG output and looking forSubscriberLimitExceeded
. With enough retries these eventually succeed, as the previous in-flight calls complete. You can also reproduce this error by settingmax_retries = 1
or by applying with version 5.35.0 or older, which does not retry and fails immediately.Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: