Open pkgw opened 1 month ago
Voting for Prioritization
Volunteering to Work on This Issue
Hey @pkgw 👋 Thank you for taking the time to raise this! For something like this, where we're adding additional functionality to existing resources (in this case, additional validation), we'd consider this an enhancement rather than a bug. I'm going to update a couple of things about this report with that in mind. No further action is needed from you at this point, I just like to let people know before I make those kinds of modifications.
Terraform Core Version
1.9.8
AWS Provider Version
5.72.1
Affected Resource(s)
aws_dynamodb_table
Expected Behavior
If you specify a DynamoDB table with both
local_secondary_index
andimport_table
blocks, the provider should report an error indicating that these two features cannot be combined. This behavior is barely documented, but can be seen in the web UI, e.g.:https://repost.aws/questions/QUHtCwkvOzRDaYdIq7TKbrLA/dynamodb-import-from-s3-does-not-support-localsecondaryindexes-bug-or-intended-behaviour
Actual Behavior
Terraform will attempt to create the resource, leading to the following hard-to-understand error:
This is what you get if you properly list both your primary keys and the key(s) associated with the LSI(s) as
attribute
items on the resource, at least.Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
I can't find any DynamoDB documentation that explicitly specifies this constraint, but if you go to the web UI and run through the wizard to manually initiate an S3 important, you'll see the alert box as screenshotted in the re:Post link above.
Would you like to implement a fix?
No