Home icon

New in Terraform: Manage global secondary index drift in Amazon DynamoDB

Database Blog



This article introduces Terraform's new experimental `aws_dynamodb_global_secondary_index` resource for managing DynamoDB GSI drift independently from table configuration.

  • New resource treats each GSI as independent with separate lifecycle management
  • Enables selective `ignore_changes` for specific GSI attributes, not all-or-nothing
  • Solves drift detection issues when capacity adjusted outside Terraform
  • Requires environment variable `TF_AWS_EXPERIMENT_dynamodb_global_secondary_index=1`
  • Supports granular control: ignore capacity changes while detecting schema modifications
  • Full support for warm throughput configuration on on-demand tables
  • Migration uses `terraform import` with zero downtime; cannot mix with traditional nested blocks
  • Experimental feature; schema may change; test in non-production first

The new resource provides better infrastructure governance by allowing operational capacity adjustments while maintaining drift detection for critical GSI changes like deletions or schema modifications.



Go to article

The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.

Related articles

Nov 20
2025
Multi-key support for Global Secondary Index in Amazon DynamoDB
Feb 3
2026
Amazon DynamoDB global tables now support replication across multiple AWS accounts
Feb 3
2026
Amazon DynamoDB global tables now support replication across AWS accounts
Nov 19
2025
Amazon DynamoDB now supports multi-attribute composite keys in global secondary indexes

The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.