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

f/dynamodb_table: add restore_source_table_arn to support cross region table restore #38953

Merged
merged 7 commits into from
Aug 21, 2024

Conversation

johnsonaj
Copy link
Contributor

@johnsonaj johnsonaj commented Aug 20, 2024

Description

Relations

Closes #34911

References

Output from Acceptance Testing

% make testacc TESTARGS='-run=TestAccDynamoDBTable_restoreCrossRegion' PKG=dynamodb

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=TestAccDynamoDBTable_restoreCrossRegion -timeout 360m
--- PASS: TestAccDynamoDBTable_restoreCrossRegion (820.98s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/dynamodb	831.689s
% make testacc TESTARGS='-run=TestAccDynamoDBTable_ -short' PKG=dynamodb

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=TestAccDynamoDBTable_ -short -timeout 360m
--- PASS: TestAccDynamoDBTable_streamSpecificationValidation (5.33s)
--- PASS: TestAccDynamoDBTable_attributeUpdateValidation (10.39s)
=== NAME  TestAccDynamoDBTable_tableClass_migrate
    table_test.go:2587: Step 1/2 error: Check failed: Check 2/2 error: aws_dynamodb_table.test: Attribute 'table_class' expected "", got "STANDARD"
--- FAIL: TestAccDynamoDBTable_tableClass_migrate (22.91s)
--- PASS: TestAccDynamoDBTable_disappears (36.57s)
--- PASS: TestAccDynamoDBTable_lsiNonKeyAttributes (41.97s)
--- PASS: TestAccDynamoDBTable_basic (44.16s)
--- PASS: TestAccDynamoDBTable_TTL_disabled (50.36s)
--- PASS: TestAccDynamoDBTable_TTL_enabled (50.57s)
--- PASS: TestAccDynamoDBTable_TTL_validate (6.96s)
--- PASS: TestAccDynamoDBTable_deletion_protection (54.91s)
--- PASS: TestAccDynamoDBTable_tableClassExplicitDefault (56.69s)
--- PASS: TestAccDynamoDBTable_TTL_update (57.94s)
--- PASS: TestAccDynamoDBTable_tags (58.00s)
--- PASS: TestAccDynamoDBTable_BillingMode_payPerRequestToProvisionedIgnoreChanges (60.34s)
--- PASS: TestAccDynamoDBTable_BillingMode_payPerRequestToProvisioned (60.65s)
--- PASS: TestAccDynamoDBTable_streamSpecification (66.11s)
--- PASS: TestAccDynamoDBTable_tableClass_ConcurrentModification (57.04s)
--- PASS: TestAccDynamoDBTable_enablePITR (73.15s)
--- PASS: TestAccDynamoDBTable_gsiUpdateCapacity (73.21s)
--- PASS: TestAccDynamoDBTable_BillingModeGSI_payPerRequestToProvisioned (74.00s)
--- PASS: TestAccDynamoDBTable_GsiUpdateNonKeyAttributes_emptyPlan (46.05s)
--- PASS: TestAccDynamoDBTable_tableClassInfrequentAccess (43.05s)
--- PASS: TestAccDynamoDBTable_lsiUpdate (62.94s)
--- PASS: TestAccDynamoDBTable_Disappears_payPerRequestWithGSI (97.49s)
--- PASS: TestAccDynamoDBTable_streamSpecificationDiffs (131.73s)
--- PASS: TestAccDynamoDBTable_BillingModeGSI_provisionedToPayPerRequest (615.65s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/dynamodb	621.804s
FAIL
make: *** [testacc] Error 1

Intermittent failure of TestAccDynamoDBTable_tableClass_migrate .

failure not related to changes

% make testacc TESTARGS='-run=TestAccDynamoDBTable_tableClass_migrate' PKG=dynamodb

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=TestAccDynamoDBTable_tableClass_migrate -timeout 360m
--- PASS: TestAccDynamoDBTable_tableClass_migrate (31.56s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/dynamodb	37.574s

Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/dynamodb Issues and PRs that pertain to the dynamodb service. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Aug 20, 2024
@johnsonaj johnsonaj added the enhancement Requests to existing resources that expand the functionality or scope. label Aug 20, 2024
@johnsonaj johnsonaj marked this pull request as ready for review August 20, 2024 22:13
@johnsonaj johnsonaj requested a review from a team as a code owner August 20, 2024 22:13
@johnsonaj johnsonaj changed the title f/dynamodb_table: add restore_source_table_arn to support cross account table restore f/dynamodb_table: add restore_source_table_arn to support cross region table restore Aug 21, 2024
@johnsonaj johnsonaj marked this pull request as draft August 21, 2024 00:21
@johnsonaj johnsonaj force-pushed the f-dynamodb_cross_region_restore branch from e66a8ef to b93b846 Compare August 21, 2024 00:43
@johnsonaj johnsonaj marked this pull request as ready for review August 21, 2024 00:49
Copy link
Member

@jar-b jar-b 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 PKG=dynamodb TESTS=TestAccDynamoDBTable_restoreCrossRegion
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='TestAccDynamoDBTable_restoreCrossRegion'  -timeout 360m
=== RUN   TestAccDynamoDBTable_restoreCrossRegion
=== PAUSE TestAccDynamoDBTable_restoreCrossRegion
=== CONT  TestAccDynamoDBTable_restoreCrossRegion
--- PASS: TestAccDynamoDBTable_restoreCrossRegion (379.72s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/dynamodb   385.833s

@johnsonaj johnsonaj merged commit d24aa52 into main Aug 21, 2024
52 checks passed
@johnsonaj johnsonaj deleted the f-dynamodb_cross_region_restore branch August 21, 2024 15:04
@github-actions github-actions bot added this to the v5.64.0 milestone Aug 21, 2024
terraform-aws-provider bot pushed a commit that referenced this pull request Aug 21, 2024
Copy link

This functionality has been released in v5.64.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 github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Aug 22, 2024
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 Sep 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/dynamodb Issues and PRs that pertain to the dynamodb service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: Support for cross-region restores in aws_dynamodb_table
2 participants