-
Notifications
You must be signed in to change notification settings - Fork 10k
Open
Labels
bugAddresses a defect in current functionality.Addresses a defect in current functionality.needs-triageWaiting for first response or review from a maintainer.Waiting for first response or review from a maintainer.service/dynamodbIssues and PRs that pertain to the dynamodb service.Issues and PRs that pertain to the dynamodb service.
Description
Terraform and AWS Provider Version
Terraform v1.10.5
on linux_amd64
AWS provider (working 6.28.0), failing 6.29.0+Affected Resource(s) or Data Source(s)
- aws_dynamodb_table
Expected Behavior
No failures/crash
Actual Behavior
Error: all indexes must match a defined attribute. Unmatched indexes: [""]
Relevant Error/Panic Output
│ Error: all indexes must match a defined attribute. Unmatched indexes: [""]
│
│ with aws_dynamodb_table.test,
│ on test.tf line 1, in resource "aws_dynamodb_table" "test":
│ 1: resource "aws_dynamodb_table" "test" {
│
╵
Error: Process completed with exit code 1.Sample Terraform Configuration
Click to expand configuration
resource "aws_dynamodb_table" "test" {
name = "test"
billing_mode = "PAY_PER_REQUEST"
hash_key = "hash"
attribute {
name = "hash"
type = "S"
}
lifecycle {
ignore_changes = [
global_secondary_index,
read_capacity,
write_capacity,
]
}
dynamic "global_secondary_index" {
for_each = ["test"]
content {
hash_key = "hash"
name = "name"
projection_type = "ALL"
}
}
}Steps to Reproduce
- Apply configuration to create AWS DynamoDB table
- Rerun plan step which will fail immediately with error:
Error: all indexes must match a defined attribute. Unmatched indexes: [""]
Only affects when global_secondary_index is in lifecycle ignore changes section. It is not affecting plan when changes are not ignored.
Debug Logging
range_key becomes empty string and afterwards it fails the check.
A regression caused by commit
GenAI / LLM Assisted Development
Not used
Important Facts and References
A regression caused by commit
Would you like to implement a fix?
No
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugAddresses a defect in current functionality.Addresses a defect in current functionality.needs-triageWaiting for first response or review from a maintainer.Waiting for first response or review from a maintainer.service/dynamodbIssues and PRs that pertain to the dynamodb service.Issues and PRs that pertain to the dynamodb service.