-
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
tls_private_key value of 'count' cannot be computed #17287
Comments
Hi @Lasering! Sorry this isn't working as expected. The "computed-ness" of that module output depends on how that output is defined. If the I think what you're seeing here is the same as #14677, which is one of the items that should be addressed by the configuration language improvements we're currently working on. The current behavior is that any list containing a computed element gets reduced to a wholly-computed list, which we then can't apply In the mean time, so far users have tended to work around this (assuming that "splat syntax" is the source of that list) by exporting a separate output that uses the Once the improved configuration language interpreter is integrated (which is our current focus) what you originally wrote here should work as you expected. Since this seems to be the same as #14677, I'm going to close this just to consolidate the discussion over there. Thanks for reporting this, and sorry again for this limitation. |
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
Expected Behavior
Terraform should have no problem computing a count that references modules.
Actual Behavior
Additional Context
Attempts made to fix the problem (none worked, always get the some output as above):
"${length(module.tagus.server-ips) + length(module.alameda.server-ips)}"
depends_on
to the modules directly.The count works if I reference a variable directly
"${var.some-var}"
. It doesn't work when the interpolations reference a module.The text was updated successfully, but these errors were encountered: