-
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
[Enhancement]: dynamodb: add arg to set deletion protection for table #29924
[Enhancement]: dynamodb: add arg to set deletion protection for table #29924
Conversation
Community NoteVoting for Prioritization
For Submitters
|
a7f593c
to
78073c3
Compare
Acceptance test output: % make testacc TESTARGS='-run=TestAccDynamoDBGlobalTable_' PKG=dynamodb ACCTEST_PARALLELISM=3 ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/dynamodb/... -v -count 1 -parallel 3 -run=TestAccDynamoDBGlobalTable_ -timeout 180m === RUN TestAccDynamoDBGlobalTable_basic === PAUSE TestAccDynamoDBGlobalTable_basic === RUN TestAccDynamoDBGlobalTable_multipleRegions === PAUSE TestAccDynamoDBGlobalTable_multipleRegions === CONT TestAccDynamoDBGlobalTable_basic === CONT TestAccDynamoDBGlobalTable_multipleRegions --- PASS: TestAccDynamoDBGlobalTable_basic (53.55s) --- PASS: TestAccDynamoDBGlobalTable_multipleRegions (97.68s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/dynamodb 103.903s
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_\|TestAccDynamoDBTableDataSource_' PKG=dynamodb ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/dynamodb/... -v -count 1 -parallel 3 -run=TestAccDynamoDBTable_\|TestAccDynamoDBTableDataSource_ -timeout 180m
=== RUN TestAccDynamoDBTableDataSource_basic
=== PAUSE TestAccDynamoDBTableDataSource_basic
=== RUN TestAccDynamoDBTable_basic
=== PAUSE TestAccDynamoDBTable_basic
=== RUN TestAccDynamoDBTable_deletion_protection
=== PAUSE TestAccDynamoDBTable_deletion_protection
=== RUN TestAccDynamoDBTable_disappears
=== PAUSE TestAccDynamoDBTable_disappears
=== RUN TestAccDynamoDBTable_Disappears_payPerRequestWithGSI
=== PAUSE TestAccDynamoDBTable_Disappears_payPerRequestWithGSI
=== RUN TestAccDynamoDBTable_extended
=== PAUSE TestAccDynamoDBTable_extended
=== RUN TestAccDynamoDBTable_enablePITR
=== PAUSE TestAccDynamoDBTable_enablePITR
=== RUN TestAccDynamoDBTable_BillingMode_payPerRequestToProvisioned
=== PAUSE TestAccDynamoDBTable_BillingMode_payPerRequestToProvisioned
=== RUN TestAccDynamoDBTable_BillingMode_payPerRequestToProvisionedIgnoreChanges
=== PAUSE TestAccDynamoDBTable_BillingMode_payPerRequestToProvisionedIgnoreChanges
=== RUN TestAccDynamoDBTable_BillingMode_provisionedToPayPerRequest
=== PAUSE TestAccDynamoDBTable_BillingMode_provisionedToPayPerRequest
=== RUN TestAccDynamoDBTable_BillingMode_provisionedToPayPerRequestIgnoreChanges
=== PAUSE TestAccDynamoDBTable_BillingMode_provisionedToPayPerRequestIgnoreChanges
=== RUN TestAccDynamoDBTable_BillingModeGSI_payPerRequestToProvisioned
=== PAUSE TestAccDynamoDBTable_BillingModeGSI_payPerRequestToProvisioned
=== RUN TestAccDynamoDBTable_BillingModeGSI_provisionedToPayPerRequest
=== PAUSE TestAccDynamoDBTable_BillingModeGSI_provisionedToPayPerRequest
=== RUN TestAccDynamoDBTable_streamSpecification
=== PAUSE TestAccDynamoDBTable_streamSpecification
=== RUN TestAccDynamoDBTable_streamSpecificationDiffs
=== PAUSE TestAccDynamoDBTable_streamSpecificationDiffs
=== RUN TestAccDynamoDBTable_streamSpecificationValidation
=== PAUSE TestAccDynamoDBTable_streamSpecificationValidation
=== RUN TestAccDynamoDBTable_tags
=== PAUSE TestAccDynamoDBTable_tags
=== RUN TestAccDynamoDBTable_gsiUpdateCapacity
=== PAUSE TestAccDynamoDBTable_gsiUpdateCapacity
=== RUN TestAccDynamoDBTable_gsiUpdateOtherAttributes
=== PAUSE TestAccDynamoDBTable_gsiUpdateOtherAttributes
=== RUN TestAccDynamoDBTable_lsiNonKeyAttributes
=== PAUSE TestAccDynamoDBTable_lsiNonKeyAttributes
=== RUN TestAccDynamoDBTable_gsiUpdateNonKeyAttributes
=== PAUSE TestAccDynamoDBTable_gsiUpdateNonKeyAttributes
=== RUN TestAccDynamoDBTable_GsiUpdateNonKeyAttributes_emptyPlan
=== PAUSE TestAccDynamoDBTable_GsiUpdateNonKeyAttributes_emptyPlan
=== RUN TestAccDynamoDBTable_TTL_enabled
=== PAUSE TestAccDynamoDBTable_TTL_enabled
=== RUN TestAccDynamoDBTable_TTL_disabled
=== PAUSE TestAccDynamoDBTable_TTL_disabled
=== RUN TestAccDynamoDBTable_attributeUpdate
=== PAUSE TestAccDynamoDBTable_attributeUpdate
=== RUN TestAccDynamoDBTable_lsiUpdate
=== PAUSE TestAccDynamoDBTable_lsiUpdate
=== RUN TestAccDynamoDBTable_attributeUpdateValidation
=== PAUSE TestAccDynamoDBTable_attributeUpdateValidation
=== RUN TestAccDynamoDBTable_encryption
=== PAUSE TestAccDynamoDBTable_encryption
=== RUN TestAccDynamoDBTable_Replica_multiple
=== PAUSE TestAccDynamoDBTable_Replica_multiple
=== RUN TestAccDynamoDBTable_Replica_single
=== PAUSE TestAccDynamoDBTable_Replica_single
=== RUN TestAccDynamoDBTable_Replica_singleStreamSpecification
=== PAUSE TestAccDynamoDBTable_Replica_singleStreamSpecification
=== RUN TestAccDynamoDBTable_Replica_singleDefaultKeyEncrypted
=== PAUSE TestAccDynamoDBTable_Replica_singleDefaultKeyEncrypted
=== RUN TestAccDynamoDBTable_Replica_singleCMK
=== PAUSE TestAccDynamoDBTable_Replica_singleCMK
=== RUN TestAccDynamoDBTable_Replica_singleAddCMK
=== PAUSE TestAccDynamoDBTable_Replica_singleAddCMK
=== RUN TestAccDynamoDBTable_Replica_pitr
=== PAUSE TestAccDynamoDBTable_Replica_pitr
=== RUN TestAccDynamoDBTable_Replica_pitrKMS
=== PAUSE TestAccDynamoDBTable_Replica_pitrKMS
=== RUN TestAccDynamoDBTable_Replica_tagsOneOfTwo
=== PAUSE TestAccDynamoDBTable_Replica_tagsOneOfTwo
=== RUN TestAccDynamoDBTable_Replica_tagsTwoOfTwo
=== PAUSE TestAccDynamoDBTable_Replica_tagsTwoOfTwo
=== RUN TestAccDynamoDBTable_Replica_tagsNext
=== PAUSE TestAccDynamoDBTable_Replica_tagsNext
=== RUN TestAccDynamoDBTable_Replica_tagsUpdate
=== PAUSE TestAccDynamoDBTable_Replica_tagsUpdate
=== RUN TestAccDynamoDBTable_tableClassInfrequentAccess
=== PAUSE TestAccDynamoDBTable_tableClassInfrequentAccess
=== RUN TestAccDynamoDBTable_tableClassExplicitDefault
=== PAUSE TestAccDynamoDBTable_tableClassExplicitDefault
=== RUN TestAccDynamoDBTable_tableClass_ConcurrentModification
=== PAUSE TestAccDynamoDBTable_tableClass_ConcurrentModification
=== RUN TestAccDynamoDBTable_tableClass_migrate
=== PAUSE TestAccDynamoDBTable_tableClass_migrate
=== RUN TestAccDynamoDBTable_backupEncryption
=== PAUSE TestAccDynamoDBTable_backupEncryption
=== RUN TestAccDynamoDBTable_backup_overrideEncryption
=== PAUSE TestAccDynamoDBTable_backup_overrideEncryption
=== CONT TestAccDynamoDBTableDataSource_basic
=== CONT TestAccDynamoDBTable_TTL_disabled
=== CONT TestAccDynamoDBTable_BillingModeGSI_provisionedToPayPerRequest
--- PASS: TestAccDynamoDBTableDataSource_basic (42.65s)
=== CONT TestAccDynamoDBTable_TTL_enabled
--- PASS: TestAccDynamoDBTable_TTL_disabled (48.23s)
=== CONT TestAccDynamoDBTable_GsiUpdateNonKeyAttributes_emptyPlan
--- PASS: TestAccDynamoDBTable_TTL_enabled (26.05s)
=== CONT TestAccDynamoDBTable_gsiUpdateNonKeyAttributes
--- PASS: TestAccDynamoDBTable_GsiUpdateNonKeyAttributes_emptyPlan (50.44s)
=== CONT TestAccDynamoDBTable_lsiNonKeyAttributes
--- PASS: TestAccDynamoDBTable_lsiNonKeyAttributes (30.23s)
=== CONT TestAccDynamoDBTable_gsiUpdateOtherAttributes
--- PASS: TestAccDynamoDBTable_gsiUpdateNonKeyAttributes (301.93s)
=== CONT TestAccDynamoDBTable_gsiUpdateCapacity
--- PASS: TestAccDynamoDBTable_gsiUpdateCapacity (56.69s)
=== CONT TestAccDynamoDBTable_tags
--- PASS: TestAccDynamoDBTable_tags (48.50s)
=== CONT TestAccDynamoDBTable_streamSpecificationValidation
--- PASS: TestAccDynamoDBTable_streamSpecificationValidation (2.29s)
=== CONT TestAccDynamoDBTable_streamSpecificationDiffs
--- PASS: TestAccDynamoDBTable_streamSpecificationDiffs (124.44s)
=== CONT TestAccDynamoDBTable_streamSpecification
--- PASS: TestAccDynamoDBTable_streamSpecification (39.40s)
=== CONT TestAccDynamoDBTable_Replica_pitrKMS
--- PASS: TestAccDynamoDBTable_gsiUpdateOtherAttributes (666.99s)
=== CONT TestAccDynamoDBTable_backup_overrideEncryption
--- PASS: TestAccDynamoDBTable_Replica_pitrKMS (617.14s)
=== CONT TestAccDynamoDBTable_backupEncryption
--- PASS: TestAccDynamoDBTable_backup_overrideEncryption (544.99s)
--- PASS: TestAccDynamoDBTable_tableClass_migrate (75.39s)
=== CONT TestAccDynamoDBTable_tableClass_ConcurrentModification
--- PASS: TestAccDynamoDBTable_tableClass_ConcurrentModification (43.26s)
=== CONT TestAccDynamoDBTable_tableClassExplicitDefault
--- PASS: TestAccDynamoDBTable_tableClassExplicitDefault (30.04s)
=== CONT TestAccDynamoDBTable_tableClassInfrequentAccess
--- PASS: TestAccDynamoDBTable_tableClassInfrequentAccess (43.13s)
=== CONT TestAccDynamoDBTable_Replica_tagsUpdate
--- PASS: TestAccDynamoDBTable_Replica_tagsUpdate (257.66s)
=== CONT TestAccDynamoDBTable_Replica_tagsNext
--- PASS: TestAccDynamoDBTable_backupEncryption (916.62s)
=== CONT TestAccDynamoDBTable_Replica_tagsTwoOfTwo
--- PASS: TestAccDynamoDBTable_Replica_tagsNext (617.75s)
=== CONT TestAccDynamoDBTable_Replica_tagsOneOfTwo
--- PASS: TestAccDynamoDBTable_Replica_tagsTwoOfTwo (269.83s)
=== CONT TestAccDynamoDBTable_Replica_single
--- PASS: TestAccDynamoDBTable_Replica_tagsOneOfTwo (347.30s)
=== CONT TestAccDynamoDBTable_Replica_pitr
--- PASS: TestAccDynamoDBTable_Replica_single (371.42s)
=== CONT TestAccDynamoDBTable_Replica_singleAddCMK
--- PASS: TestAccDynamoDBTable_Replica_pitr (355.66s)
=== CONT TestAccDynamoDBTable_Replica_singleStreamSpecification
--- PASS: TestAccDynamoDBTable_Replica_singleStreamSpecification (234.30s)
=== CONT TestAccDynamoDBTable_attributeUpdateValidation
--- PASS: TestAccDynamoDBTable_attributeUpdateValidation (4.27s)
=== CONT TestAccDynamoDBTable_Replica_multiple
--- PASS: TestAccDynamoDBTable_Replica_singleAddCMK (605.67s)
=== CONT TestAccDynamoDBTable_encryption
--- PASS: TestAccDynamoDBTable_encryption (114.93s)
=== CONT TestAccDynamoDBTable_lsiUpdate
--- PASS: TestAccDynamoDBTable_BillingModeGSI_provisionedToPayPerRequest (3526.70s)
=== CONT TestAccDynamoDBTable_attributeUpdate
--- PASS: TestAccDynamoDBTable_lsiUpdate (46.99s)
=== CONT TestAccDynamoDBTable_enablePITR
--- PASS: TestAccDynamoDBTable_enablePITR (78.30s)
=== CONT TestAccDynamoDBTable_BillingModeGSI_payPerRequestToProvisioned
--- PASS: TestAccDynamoDBTable_BillingModeGSI_payPerRequestToProvisioned (61.44s)
=== CONT TestAccDynamoDBTable_BillingMode_provisionedToPayPerRequestIgnoreChanges
--- PASS: TestAccDynamoDBTable_Replica_multiple (597.21s)
=== CONT TestAccDynamoDBTable_BillingMode_provisionedToPayPerRequest
--- PASS: TestAccDynamoDBTable_attributeUpdate (748.90s)
=== CONT TestAccDynamoDBTable_BillingMode_payPerRequestToProvisionedIgnoreChanges
--- PASS: TestAccDynamoDBTable_BillingMode_payPerRequestToProvisionedIgnoreChanges (42.28s)
=== CONT TestAccDynamoDBTable_BillingMode_payPerRequestToProvisioned
--- PASS: TestAccDynamoDBTable_BillingMode_payPerRequestToProvisioned (41.25s)
=== CONT TestAccDynamoDBTable_disappears
--- PASS: TestAccDynamoDBTable_BillingMode_provisionedToPayPerRequest (490.86s)
=== CONT TestAccDynamoDBTable_Replica_singleDefaultKeyEncrypted
--- PASS: TestAccDynamoDBTable_disappears (20.56s)
=== CONT TestAccDynamoDBTable_Replica_singleCMK
--- PASS: TestAccDynamoDBTable_Replica_singleDefaultKeyEncrypted (231.36s)
=== CONT TestAccDynamoDBTable_deletion_protection
--- PASS: TestAccDynamoDBTable_Replica_singleCMK (221.30s)
=== CONT TestAccDynamoDBTable_extended
--- PASS: TestAccDynamoDBTable_deletion_protection (41.72s)
=== CONT TestAccDynamoDBTable_Disappears_payPerRequestWithGSI
--- PASS: TestAccDynamoDBTable_Disappears_payPerRequestWithGSI (85.46s)
=== CONT TestAccDynamoDBTable_basic
--- PASS: TestAccDynamoDBTable_basic (26.48s)
--- PASS: TestAccDynamoDBTable_BillingMode_provisionedToPayPerRequestIgnoreChanges (1071.59s)
--- PASS: TestAccDynamoDBTable_extended (533.33s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/dynamodb 5139.772s
@NabilHouidi Thanks for the contribution 🎉 👏. |
This functionality has been released in v4.59.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! |
Why didn't you implement it the same way as PITR is implemented/defined as of today?
vs
Tbh, I hate such inconsistencies 😄 |
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
Adds support to enable/disable deletion protection when creating/updating a dynamodb table.
Relations
Closes #29876
References
https://aws.amazon.com/about-aws/whats-new/2023/03/amazon-dynamodb-table-deletion-protection/
https://docs.aws.amazon.com/cli/latest/reference/dynamodb/create-table.html
https://docs.aws.amazon.com/cli/latest/reference/dynamodb/create-table.html
Output from Acceptance Testing