Changing a global secondary index attribute type fails to take effect DynamoDB #22852
Labels
bug
Addresses a defect in current functionality.
service/dynamodb
Issues and PRs that pertain to the dynamodb service.
Community Note
Terraform CLI and Terraform AWS Provider Version
Terraform v1.1.4
on windows_amd64
Affected Resource(s)
resource "aws_dynamodb_table"
Terraform Configuration Files
Debug Output
terraform apply
aws_dynamodb_table.test-dynamodb-table: Refreshing state... [id=TestDynamo]
No changes. Your infrastructure matches the configuration.
Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.
Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
Panic Output
Expected Behavior
When the attribute of ProgVersion is changed from S to N, we expect the index to be revised from using String to Number.
e,g.:
attribute {
name = "ProgVersion"
type = "S"
}
Change the above to:
attribute {
name = "ProgVersion"
type = "N"
}
Actual Behavior
Terraform doesn't detect the updated attribute for the index. Responds with :
Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.
Steps to Reproduce
terraform init
terraform appy
Change attribute type of ProgVersion from S to N.
terraform appy
No change is made to the database, as terraform fails to detect the change.
Important Factoids
References
hashicorp/terraform#30446
The text was updated successfully, but these errors were encountered: