-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
* does not work as expected with null_data_source #18926
Comments
Hi @EgidioCaprino! Sorry this didn't work as expected. The problem here is that The forthcoming Terraform 0.12 will generate a proper error message here, and will also include a way to get the result I think you wanted: # Forthcoming Terraform 0.12 syntax. (Some details may change before release)
variable "global_secondary_index" {
type = list(object({
name = string
hash_key = string
}))
default = []
}
resource "aws_dynamodb_table" "table" {
# ...
dynamic "global_secondary_index" {
for_each = var.global_secondary_index
content {
name = global_secondary_index.value.name
write_capacity = var.write_capacity
read_capacity = var.read_capacity
hash_key = global_secondary_index.value.hash_key
projection_type = "ALL"
}
}
# ...
} This new special |
This feature is covered by #7034, so I'm going to close this one just to consolidate the discussion over there. |
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Terraform Version
Terraform Configuration Files
Debug Output
https://gist.github.com/EgidioCaprino/f89af0465287f53c6992c4d50131d8a5
Crash Output
Expected Behavior
global_secondary_index
attribute to be populated with a valid list, specified in the `null_data_source_Actual Behavior
Items in
global_secondary_index
do not have valid attributes, as specified in thernull_data_source
The text was updated successfully, but these errors were encountered: