-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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 use cache_nodes output of aws_elasticache_cluster as a list #8794
Comments
I am seeing this too, trying to get a list of addresses however ${join(",", aws_elasticache_cluster.main.cache_nodes.*.address)} appears to be empty |
+1 we also had this problem. The current workaround for us is using a template file, but it relies on the underlying format of AWS configuration endpoint in conjunction with the individual node endpoints which is pretty hacky:
And then the template file:
|
Woot, thank you! 🎉 |
@mitchellh we're still seeing the problem occur, should we re-open? |
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 v0.7.3
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
I get a list of 3 node addresses as an output.
Actual Behavior
I get nothing.
Steps to Reproduce
terraform apply
Important Factoids
If I change the output to a hard-coded item, it works correctly:
But this obviously doesn't work if the number of cache nodes is controlled by a variable. I tried to work around it in various ways, but it looks like
cache_nodes
isn't a proper list. All the typical list operations, likejoin
,split
, andelement
do not work on it. Therefore, I can't find any way to dynamically return a list of node addresses or ids or to pass them onto another module (e.g. a module that adds CloudWatch alarms to each node).References
The text was updated successfully, but these errors were encountered: