-
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
value of 'count' cannot be computed #13980
Comments
Hi @Puneeth-n! When Terraform says "computed" here it means a value that isn't known until its associated resource is created. It works on a subsequent run because the resource has already been created by then and so the value is known. There is an extra tricky thing in your case: although the Currently you can work around this by using the You could also address this in your specific situation by flattening that map into three separate variables, thus preventing the computed nature of one from impacting the others. In the long term we will fix this with something like #4149. We are slowly making progress towards that via core refactoring to enable it. That change will make Terraform automatically detect that the change must be made in multiple passes and work through it automatically. Since that other issue is already representing that work, I'm going to close this. Thanks for opening this issue! |
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: 0.9.3
I know this issue has been discussed time and again (Ex: #12570) and that if a module has a map variable and has interpolation inside this map variable, count inside a module results in
value of 'count' cannot be computed
.What puzzles me is that this error occurs when terraforming a new environment but not any existing environment!
I recently migrated a bunch of environments from 0.7.13 to 0.9.3 and I get it when I terraform an environment for the first time but not on any of the existing environments.
example config:
Inside the module:
The text was updated successfully, but these errors were encountered: