-
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: Fixes perpetual diff when ttl.attribute_name
is set when not enabled
#37991
Conversation
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 TESTARGS='-run=TestAccDynamoDBTable_basic\|TestAccDynamoDBTable_TTL_' PKG=dynamodb ACCTEST_PARALLELISM=3
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/dynamodb/... -v -count 1 -parallel 3 -run=TestAccDynamoDBTable_basic\|TestAccDynamoDBTable_TTL_ -timeout 360m
=== RUN TestAccDynamoDBTable_basic
=== PAUSE TestAccDynamoDBTable_basic
=== RUN TestAccDynamoDBTable_TTL_enabled
=== PAUSE TestAccDynamoDBTable_TTL_enabled
=== RUN TestAccDynamoDBTable_TTL_disabled
=== PAUSE TestAccDynamoDBTable_TTL_disabled
=== RUN TestAccDynamoDBTable_TTL_update
=== PAUSE TestAccDynamoDBTable_TTL_update
=== RUN TestAccDynamoDBTable_TTL_validate
=== PAUSE TestAccDynamoDBTable_TTL_validate
=== CONT TestAccDynamoDBTable_basic
=== CONT TestAccDynamoDBTable_TTL_update
=== CONT TestAccDynamoDBTable_TTL_validate
--- PASS: TestAccDynamoDBTable_TTL_validate (4.99s)
=== CONT TestAccDynamoDBTable_TTL_disabled
--- PASS: TestAccDynamoDBTable_basic (22.47s)
=== CONT TestAccDynamoDBTable_TTL_enabled
--- PASS: TestAccDynamoDBTable_TTL_disabled (21.78s)
--- PASS: TestAccDynamoDBTable_TTL_update (32.69s)
--- PASS: TestAccDynamoDBTable_TTL_enabled (25.94s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/dynamodb 52.868s
Needs a CHANGELOG entry.
This functionality has been released in v5.55.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! |
Previously you could set the TTL attribute's name even though TTL was disabled. This resulted in permadiffs. Upstream introduced added validation in this PR: hashicorp/terraform-provider-aws#37991
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
If
ttl.attribute_name
is set when not enabled, it would cause a perpetual diff. Adds validation to requireattribute_name
when enabled, and not allow it when not enabled.Relations
Closes #10304
References
Output from Acceptance Testing