-
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
resource/aws_dynamodb_table: Update and validate attributes #3194
Conversation
FYI this requires a rebase for Can you find documentation to support this? |
ad32991
to
0d8443b
Compare
I came to that conclusion after: a. Getting this error message:
b. When DynamoDB removed an attribute during I however agree it's not very clear and we should get a confirmation from AWS support and perhaps paste it here. I'll reach out to them. |
AWS support just confirmed what I wrote above:
Admittedly my comment may be suggesting DynamoDB requires you to define schema for all attributes, but that's partially because of how much the resource schema is drifted from API's naming convention. Maybe if |
Ah okay - this makes more sense. Thank you for clarifying here! I just wanted to be sure this configuration is still valid (you can have attribute definitions that are not indexed): resource "aws_dynamodb_table" "basic-dynamodb-table" {
name = "%s"
read_capacity = 10
write_capacity = 10
hash_key = "staticHashKey"
attribute {
name = "staticHashKey"
type = "S"
}
attribute {
name = "indexed"
type = "%s"
}
attribute {
name = "notIndexed"
type = "%s"
}
global_secondary_index {
name = "gsiName"
hash_key = "indexed"
write_capacity = 10
read_capacity = 10
projection_type = "KEYS_ONLY"
}
} Maybe some simple rewording of comments/variable names like this would help me personally (and potentially other future code readers) 😄
What do you think? Otherwise, I think this is good to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay it turns out that I completely misunderstood AttributeDefinition
under the hood that they cannot specify extra attributes (a limitation on the AWS side). Knowing that, this PR looks great once its rebased. 👍
0d8443b
to
d0effb7
Compare
d0effb7
to
5f9d283
Compare
5f9d283
to
2a73882
Compare
2a73882
to
823cad4
Compare
Currently blocked by hashicorp/terraform#17261 |
3575e8b
to
0296e20
Compare
Update: we're still waiting on upstream Terraform core 0.11.4 release (rather than vendoring a commit SHA) |
@radeksimko upstream Terraform 0.11.4 has been vendored! 😄 |
0296e20
to
05cdd35
Compare
Rebased & ran related acceptance tests - all green, so I'm going to merge this. |
This has been released in version 1.12.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
We are using Terraform |
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! |
Fixes #1424
Test results