Skip to content
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_elasticache_cluster.redis' does not have attribute 'cache_nodes.*.address' for variable 'aws_elasticache_cluster.redis.cache_nodes.*.address' #7957

Closed
iroller opened this issue Aug 3, 2016 · 5 comments

Comments

@iroller
Copy link
Contributor

iroller commented Aug 3, 2016

Terraform Version

0.7.0

Affected Resource(s)

  • aws_elasticache_cluster
  • module outputs

Terraform Configuration Files

## Module
resource "aws_elasticache_cluster" "redis" {
  engine               = "redis"
...
}

// Addresses
output "addresses" {
  value = "${join(",", aws_elasticache_cluster.redis.cache_nodes.*.address)}"
}


## Using module
module "redis" {
...
}

output "redis_endpoint_addresses" {
  value = "${module.redis.addresses}"
}

Debug Output

[WARN] Output interpolation "addresses" failed: Resource 'aws_elasticache_cluster.redis' does not have attribute 'cache_nodes.*.address' for variable 'aws_elasticache_cluster.redis.cache_nodes.*.address'

Expected Behavior

I expected a string outout, e.g. "10.10.0.1,10.10.0.2"

Actual Behavior

No output at all.

References

@iroller
Copy link
Contributor Author

iroller commented Aug 4, 2016

The same happens when using memcached engine:

"${formatlist("%s:%s", aws_elasticache_cluster.memcached.cache_nodes.*.address, aws_elasticache_cluster.memcached.cache_nodes.*.port)}"

^^gives no output

@sumerman
Copy link

sumerman commented Aug 11, 2016

I had the same issue with my plugin and this is my workaround.

Essentially instead of using endpoint.address as a source for the DNS record, I've added a surrogate attribute endpoint_address which works just fine. This leads me to believe there is an issue with nested computed attributes in core.

P.S.: to make a repro case out my test it's enough to replace endpoint_address with endpoint.address here

@sumerman
Copy link

sumerman commented Aug 19, 2016

I believe this issue is related to #7241 and/or #3679

@steblynskyi
Copy link

records = ["${aws_elasticache_cluster.session-storage.cache_nodes.0.address}"]

depends_on = ["aws_elasticache_cluster.session-storage"]

@ghost
Copy link

ghost commented Apr 2, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants