Skip to content
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: Handles Tables in ARCHIVED status #26744

Merged
merged 3 commits into from
Sep 12, 2022

Conversation

gdavison
Copy link
Contributor

@gdavison gdavison commented Sep 9, 2022

When reading a table in ARCHIVED status, the call to DescribeContinuousBackups fails with a TableNotFoundException as follows:

error reading DynamoDB Table (tf-acc-test-5583795887817721678): reading Amazon DynamoDB Table (tf-acc-test-5583795887817721678): continuous backups: TableNotFoundException: Table not found: tf-acc-test-5583795887817721678

Closes #26577

Output from acceptance testing:

$ make testacc PKG=dynamodb TESTS=TestAccDynamoDBTable

--- PASS: TestAccDynamoDBTable_disappears (37.48s)
--- PASS: TestAccDynamoDBTable_basic (45.73s)
--- PASS: TestAccDynamoDBTableItem_updateWithRangeKey (72.15s)
--- PASS: TestAccDynamoDBTableDataSource_basic (72.51s)
--- PASS: TestAccDynamoDBTable_TTL_disabled (80.89s)
--- PASS: TestAccDynamoDBTable_BillingMode_payPerRequestToProvisioned (86.91s)
--- PASS: TestAccDynamoDBTable_BillingMode_payPerRequestToProvisionedIgnoreChanges (87.73s)
--- PASS: TestAccDynamoDBTable_tableClassInfrequentAccess (92.24s)
--- PASS: TestAccDynamoDBTable_streamSpecificationValidation (5.11s)
--- PASS: TestAccDynamoDBTable_BillingModeGSI_payPerRequestToProvisioned (105.91s)
--- PASS: TestAccDynamoDBTableItem_update (73.74s)
--- PASS: TestAccDynamoDBTable_enablePITR (113.58s)
--- PASS: TestAccDynamoDBTable_Disappears_payPerRequestWithGSI (122.55s)
--- PASS: TestAccDynamoDBTable_TTL_enabled (54.24s)
--- PASS: TestAccDynamoDBTableItem_withMultipleItems (36.57s)
--- PASS: TestAccDynamoDBTable_lsiNonKeyAttributes (52.23s)
--- PASS: TestAccDynamoDBTableItem_wonkyItems (39.05s)
--- PASS: TestAccDynamoDBTable_GsiUpdateNonKeyAttributes_emptyPlan (80.44s)
--- PASS: TestAccDynamoDBTable_tags (52.52s)
--- PASS: TestAccDynamoDBTable_attributeUpdateValidation (10.92s)
--- PASS: TestAccDynamoDBTableItem_rangeKey (37.89s)
--- PASS: TestAccDynamoDBTable_gsiUpdateCapacity (89.23s)
--- PASS: TestAccDynamoDBTable_streamSpecification (73.86s)
--- PASS: TestAccDynamoDBTable_encryption (111.60s)
--- PASS: TestAccDynamoDBTable_backupEncryption (310.40s)
--- PASS: TestAccDynamoDBTableItem_basic (21.49s)
--- PASS: TestAccDynamoDBTableReplica_tableClass (347.80s)
--- PASS: TestAccDynamoDBTableItem_disappears (21.68s)
--- PASS: TestAccDynamoDBTableReplica_disappears (190.65s)
--- PASS: TestAccDynamoDBTable_Replica_tagsTwoOfTwo (287.90s)
--- PASS: TestAccDynamoDBTable_Replica_pitr (266.29s)
--- PASS: TestAccDynamoDBTable_lsiUpdate (44.60s)
--- PASS: TestAccDynamoDBTable_Replica_singleWithCMK (263.23s)
--- PASS: TestAccDynamoDBTable_Replica_tagsOneOfTwo (285.76s)
--- PASS: TestAccDynamoDBTable_Replica_tagsUpdate (426.70s)
--- PASS: TestAccDynamoDBTableReplica_tags (428.47s)
--- PASS: TestAccDynamoDBTable_extended (501.26s)
--- PASS: TestAccDynamoDBTable_gsiUpdateNonKeyAttributes (425.38s)
--- PASS: TestAccDynamoDBTableReplica_pitr (270.65s)
--- PASS: TestAccDynamoDBTableReplica_basic (258.82s)
--- PASS: TestAccDynamoDBTable_Replica_multiple (500.60s)
--- PASS: TestAccDynamoDBTable_Replica_single (542.56s)
--- PASS: TestAccDynamoDBTable_Replica_tagsNext (669.32s)
--- PASS: TestAccDynamoDBTable_backup_overrideEncryption (872.09s)
--- PASS: TestAccDynamoDBTable_BillingMode_provisionedToPayPerRequest (874.97s)
--- PASS: TestAccDynamoDBTable_BillingModeGSI_provisionedToPayPerRequest (717.78s)
--- PASS: TestAccDynamoDBTable_gsiUpdateOtherAttributes (949.37s)
--- PASS: TestAccDynamoDBTable_BillingMode_provisionedToPayPerRequestIgnoreChanges (1272.23s)
--- PASS: TestAccDynamoDBTable_attributeUpdate (1076.57s)

@github-actions github-actions bot added size/XS Managed by automation to categorize the size of a PR. service/dynamodb Issues and PRs that pertain to the dynamodb service. labels Sep 9, 2022
@github-actions github-actions bot added size/S Managed by automation to categorize the size of a PR. sweeper Pertains to changes to or issues with the sweeper. and removed size/XS Managed by automation to categorize the size of a PR. labels Sep 10, 2022
Copy link
Contributor

@ewbankkit ewbankkit left a 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_disappears\|TestAccDynamoDBTableDataSource_' PKG=dynamodb ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/dynamodb/... -v -count 1 -parallel 2  -run=TestAccDynamoDBTable_basic\|TestAccDynamoDBTable_disappears\|TestAccDynamoDBTableDataSource_ -timeout 180m
=== RUN   TestAccDynamoDBTableDataSource_basic
=== PAUSE TestAccDynamoDBTableDataSource_basic
=== RUN   TestAccDynamoDBTable_basic
=== PAUSE TestAccDynamoDBTable_basic
=== RUN   TestAccDynamoDBTable_disappears
=== PAUSE TestAccDynamoDBTable_disappears
=== CONT  TestAccDynamoDBTableDataSource_basic
=== CONT  TestAccDynamoDBTable_disappears
--- PASS: TestAccDynamoDBTable_disappears (25.59s)
=== CONT  TestAccDynamoDBTable_basic
--- PASS: TestAccDynamoDBTableDataSource_basic (50.81s)
--- PASS: TestAccDynamoDBTable_basic (27.96s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/dynamodb	58.325s

@gdavison gdavison merged commit 4a500b4 into main Sep 12, 2022
@gdavison gdavison deleted the b-archived-dynamo-table branch September 12, 2022 18:07
@github-actions github-actions bot added this to the v4.31.0 milestone Sep 12, 2022
github-actions bot pushed a commit that referenced this pull request Sep 12, 2022
@github-actions
Copy link

This functionality has been released in v4.31.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!

@github-actions
Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/dynamodb Issues and PRs that pertain to the dynamodb service. size/S Managed by automation to categorize the size of a PR. sweeper Pertains to changes to or issues with the sweeper.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

resource/aws_dynamodb_table: Reading fails when table is ARCHIVED
2 participants