-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Errror: Value of count cannot be computed #15172
Comments
Hi @awhamann! Sorry this isn't behaving as expected. Currently Terraform isn't able to automatically deal with this situation. Although in principle it should be possible to know the length of the subnets list even though the resources haven't been created yet, currently Terraform treats the entire list (including its length) as unknown until the resources have been created. To work around this, it's necessary to use
In future we hope to make this work as expected through improvements to the configuration language. This issue is already captured in #14677, so I'm going to close this issue just to keep the discussion consolidated over there. Thanks for filing 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. |
Issue
Unable to dynamically allocate one or more route table, routes or route associations per subnets. Attempts to do so returns the error:
aws_route_table.route_table: aws_route_table.route_table: value of 'count' cannot be computed
Terraform Version
Terraform v0.9.7
Affected Resource(s)
This may be a core issue as I have seen the behavior with other resources from providers other than AWS.
Terraform Configuration Files
main.tf
Debug Output
terraform.log
Expected Behavior
What should have happened?
A route table should be have been created with one route associated with each subnet.
Actual Behavior
What actually happened?
Error running plan: 1 error(s) occurred:
Steps to Reproduce
References
#12570
The text was updated successfully, but these errors were encountered: