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

feat: Add incremental export support for aws_dynamodb_table_export #41303

Conversation

acwwat
Copy link
Contributor

@acwwat acwwat commented Feb 10, 2025

Description

This PR adds incremental export support to the aws_dynamodb_table_export resource, specifically adding the export_type argument and the incremental_export_specification configuration block.

Note that testing this feature is time consuming, as there needs to be at least 15 minutes of differences between export_from_time and export_to_time which starts after the table is created. In the test case, I added a 16-minute wait time to prevent 400 errors.

Relations

Closes #41287

References

Referred to ExportTableToPointInTime for specs and wordings.

Output from Acceptance Testing

$ make testacc TESTS=TestAccDynamoDBTableExport_ PKG=dynamodb
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.5 test ./internal/service/dynamodb/... -v -count 1 -parallel 20 -run='TestAccDynamoDBTableExport_'  -timeout 360m -vet=off
2025/02/09 19:44:01 Initializing Terraform AWS Provider...
=== RUN   TestAccDynamoDBTableExport_basic
=== PAUSE TestAccDynamoDBTableExport_basic
=== RUN   TestAccDynamoDBTableExport_kms
=== PAUSE TestAccDynamoDBTableExport_kms
=== RUN   TestAccDynamoDBTableExport_s3Prefix
=== PAUSE TestAccDynamoDBTableExport_s3Prefix
=== RUN   TestAccDynamoDBTableExport_incrementalExport
=== PAUSE TestAccDynamoDBTableExport_incrementalExport
=== CONT  TestAccDynamoDBTableExport_basic
=== CONT  TestAccDynamoDBTableExport_s3Prefix
=== CONT  TestAccDynamoDBTableExport_kms
=== CONT  TestAccDynamoDBTableExport_incrementalExport
--- PASS: TestAccDynamoDBTableExport_s3Prefix (929.49s)
--- PASS: TestAccDynamoDBTableExport_basic (941.33s)
--- PASS: TestAccDynamoDBTableExport_kms (946.07s)
--- PASS: TestAccDynamoDBTableExport_incrementalExport (1682.95s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/dynamodb   1683.152s

$

@acwwat acwwat requested a review from a team as a code owner February 10, 2025 01:18
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. needs-triage Waiting for first response or review from a maintainer. external-maintainer Contribution from a trusted external contributor. labels Feb 10, 2025
@acwwat acwwat force-pushed the f-aws_dynamodb_table_export-add_incremental_export_support branch 3 times, most recently from ecb3734 to aa63bc8 Compare February 10, 2025 01:28
@acwwat acwwat changed the title feat: Add incremental export support forr aws_dynamodb_table_export feat: Add incremental export support for aws_dynamodb_table_export Feb 10, 2025
@acwwat acwwat force-pushed the f-aws_dynamodb_table_export-add_incremental_export_support branch from aa63bc8 to 8d4d0f3 Compare February 10, 2025 02:35
@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Feb 10, 2025
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=TestAccDynamoDBTableExport_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.5 test ./internal/service/dynamodb/... -v -count 1 -parallel 20 -run='TestAccDynamoDBTableExport_'  -timeout 360m -vet=off
2025/02/11 10:22:06 Initializing Terraform AWS Provider...

--- PASS: TestAccDynamoDBTableExport_s3Prefix (922.61s)
--- PASS: TestAccDynamoDBTableExport_kms (937.72s)
--- PASS: TestAccDynamoDBTableExport_basic (969.12s)
--- PASS: TestAccDynamoDBTableExport_incrementalExport (1734.52s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/dynamodb   1741.228s

@jar-b
Copy link
Member

jar-b commented Feb 11, 2025

Thanks for your contribution, @acwwat! 👍

@jar-b jar-b merged commit dbf8eba into hashicorp:main Feb 11, 2025
50 checks passed
@github-actions github-actions bot added this to the v5.87.0 milestone Feb 11, 2025
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. external-maintainer Contribution from a trusted external contributor. 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]: incremental export support in aws_dynamodb_table_export
3 participants