-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
DynamoDB table not replaced when changing name or range_key of local_secondary_index #12334
Comments
I tried to add a test in |
I am also seeing this problem when I try to update an LSI index. However I found as a work around that I can add a new LSI index and it will pick up the change. I just cannot update an existing index. So that is unfortunate since now I have duplicate indexes and extra work for dynamo to update them, but I can continue until this is resolved. |
…e-for-lsi-change Replace DyanmoDB table when local secondary index changes (#12334)
The PR fixing this behavior has been merged and will release with |
This has been released in version 3.8.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 for triage. Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
The DynamoDB table should be replaced.
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LSI.html
https://www.terraform.io/docs/providers/aws/r/dynamodb_table.html#local_secondary_index
Since a local secondary index can't be changed after a table is created, the table should be recreated when there is a change in one of the local secondary indexes.
This is the expected terraform output:
Actual Behavior
The DynamoDB table is updated in-place.
But the local secondary index's name remains the same after the
terraform apply
, because you can't make changes to a local secondary index after the table was created.This is the actual terraform output:
Steps to Reproduce
terraform apply
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: