Skip to content

Conversation

@raduendv
Copy link

@raduendv raduendv commented Nov 8, 2025

Description

Introduces a new optional resources aws_dynamodb_global_resource_index which allows users to use lifecycle.ignore_changes for properties like read_capacity and write_capacity.

Adoption is optional, old aws_dynamodb_table resource works the same. The new resource does not work together with the old global_secondary_index block, one must be chosen over the other.

Users migrating to this new resource must import existing indexes into new resource blocks. Users that change their mind can remove the new resources from state and revert back to old config.

Relations

Closes #671

Output from Acceptance Testing

% make testacc TESTS=TestAccDynamoDBGlobalSecondaryIndex_ PKG=dynamodb

make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_dynamodb_global_resource_index-new-resource 🌿...
TF_ACC=1 /Users/radugribincea/.gvm/gos/go1.24.6/bin/go test ./internal/service/dynamodb/... -v -count 1 -parallel 20 -run='TestAccDynamoDBGlobalSecondaryIndex_'  -timeout 360m -vet=off
2025/11/08 01:59:32 Creating Terraform AWS Provider (SDKv2-style)...
2025/11/08 01:59:32 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccDynamoDBGlobalSecondaryIndex_basic
=== PAUSE TestAccDynamoDBGlobalSecondaryIndex_basic
=== RUN   TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest
=== PAUSE TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest
=== RUN   TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest_onDemandThroughput
=== PAUSE TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest_onDemandThroughput
=== RUN   TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest_capacityChange
=== PAUSE TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest_capacityChange
=== RUN   TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest_capacityChange_ignoreChanges
=== PAUSE TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest_capacityChange_ignoreChanges
=== RUN   TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest_onDemandThroughput_capacityChange
=== PAUSE TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest_onDemandThroughput_capacityChange
=== RUN   TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest_onDemandThroughput_capacityChange_ignoreChanges
=== PAUSE TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest_onDemandThroughput_capacityChange_ignoreChanges
=== RUN   TestAccDynamoDBGlobalSecondaryIndex_attributeValidation
=== PAUSE TestAccDynamoDBGlobalSecondaryIndex_attributeValidation
=== RUN   TestAccDynamoDBGlobalSecondaryIndex_payPerRequest_to_provisioned
=== PAUSE TestAccDynamoDBGlobalSecondaryIndex_payPerRequest_to_provisioned
=== RUN   TestAccDynamoDBGlobalSecondaryIndex_provisioned_to_payPerRequest
=== PAUSE TestAccDynamoDBGlobalSecondaryIndex_provisioned_to_payPerRequest
=== CONT  TestAccDynamoDBGlobalSecondaryIndex_basic
=== CONT  TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest_onDemandThroughput_capacityChange
=== CONT  TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest_capacityChange
=== CONT  TestAccDynamoDBGlobalSecondaryIndex_payPerRequest_to_provisioned
=== CONT  TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest_capacityChange_ignoreChanges
=== CONT  TestAccDynamoDBGlobalSecondaryIndex_attributeValidation
=== CONT  TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest_onDemandThroughput_capacityChange_ignoreChanges
=== CONT  TestAccDynamoDBGlobalSecondaryIndex_provisioned_to_payPerRequest
=== CONT  TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest_onDemandThroughput
=== CONT  TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest
--- PASS: TestAccDynamoDBGlobalSecondaryIndex_attributeValidation (60.12s)
--- PASS: TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest_onDemandThroughput (416.30s)
--- PASS: TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest (416.55s)
--- PASS: TestAccDynamoDBGlobalSecondaryIndex_basic (428.00s)
--- PASS: TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest_capacityChange (455.81s)
--- PASS: TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest_capacityChange_ignoreChanges (461.51s)
--- PASS: TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest_onDemandThroughput_capacityChange (461.52s)
--- PASS: TestAccDynamoDBGlobalSecondaryIndex_billingPayPerRequest_onDemandThroughput_capacityChange_ignoreChanges (462.98s)
--- PASS: TestAccDynamoDBGlobalSecondaryIndex_payPerRequest_to_provisioned (558.47s)
--- PASS: TestAccDynamoDBGlobalSecondaryIndex_provisioned_to_payPerRequest (634.68s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/dynamodb	643.506s

@raduendv raduendv requested a review from a team as a code owner November 8, 2025 00:10
@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2025

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2025

✅ Thank you for correcting the previously detected issues! The maintainers appreciate your efforts to make the review process as smooth as possible.

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. 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. provider Pertains to the provider itself, rather than any interaction with AWS. linter Pertains to changes to or issues with the various linters. service/location Issues and PRs that pertain to the location service. generators Relates to code generators. size/XL Managed by automation to categorize the size of a PR. labels Nov 8, 2025
@raduendv raduendv force-pushed the f-aws_dynamodb_global_resource_index-new-resource branch from 4c45301 to 7135ccb Compare November 8, 2025 00:11
@raduendv raduendv changed the title new aws_dynamodb_global_resource_index resource new aws_dynamodb_global_secondary_index resource Nov 10, 2025
@raduendv raduendv force-pushed the f-aws_dynamodb_global_resource_index-new-resource branch from 7135ccb to 1475de0 Compare November 10, 2025 13:21
@raduendv raduendv force-pushed the f-aws_dynamodb_global_resource_index-new-resource branch from 1475de0 to 3b99514 Compare November 10, 2025 13:21
@justinretzolk justinretzolk added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Addresses a defect in current functionality. documentation Introduces or discusses updates to documentation. generators Relates to code generators. linter Pertains to changes to or issues with the various linters. provider Pertains to the provider itself, rather than any interaction with AWS. service/dynamodb Issues and PRs that pertain to the dynamodb service. service/location Issues and PRs that pertain to the location service. size/XL Managed by automation to categorize the size of a PR. 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.

No method to ignore changes in DynamoDB GSI

2 participants