You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems reasonable that I could do "${length(aws_eip.<name>.*.id)}" to return the count of elastic IP resources. This produces an error currently. I can successfully use this interpolation for outputs, but I cannot use it for other resource interpolations.
Further testing actually shows i might not be able to perform a length() operation on any splat... which is awful. Pretty darn sure this worked in 0.7.x series
Sorry, but this doesn't work and hasn't ever worked in recent memory. I tried versions 0.8.1, 0.7.13, 0.7.0, and 0.6.0 (whew!). The error message has gotten better over time, but the functionality has never worked.
There is a mega issue here at #3888 that we're hoping we can resolve with 0.9. I'll close as a dup of that.
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
locked and limited conversation to collaborators
Apr 18, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It seems reasonable that I could do
"${length(aws_eip.<name>.*.id)}"
to return the count of elastic IP resources. This produces an error currently. I can successfully use this interpolation for outputs, but I cannot use it for other resource interpolations.Further testing actually shows i might not be able to perform a
length()
operation on any splat... which is awful. Pretty darn sure this worked in 0.7.x seriesTerraform Version
0.8.1
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
N/A
Expected Behavior
I should be able to use
length()
interpolation on theaws_eip
resource in other count metavars of resourcesActual Behavior
terraform plan
andterraform apply
fails to run with the error:* aws_instance.instance: resource count can't reference resource variable: aws_eip.chef-nat-eip.*.id
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform plan
Important Factoids
N/A
References
The text was updated successfully, but these errors were encountered: