-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Can't splat over a resource's list attribute #2833
Comments
Any movement on being able to splat over list attributes? |
This will be supported in the next major version of Terraform, as described in the Generalized Splat Expressions article. |
In Terraform v0.12-alpha1 we can see the new "generalized splat" behavior working for all list values: locals {
example = [
{
id = "foo"
},
{
id = "bar"
},
{
id = "baz"
},
]
}
output "example" {
value = local.example.*.id
}
Although the above uses a local value list for simplicity, the splat expression syntax can now be applied to any list value, regardless of where it is obtained from. |
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. |
The best example is for elasticache:
When testing locally with our own stacks, cache_nodes isn't even an output when I do the above. For now we've simply restricted the cluster size to 1 and access the cache_node directly.
The text was updated successfully, but these errors were encountered: