-
Notifications
You must be signed in to change notification settings - Fork 91
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
[BUG] Error: Invalid count argument #83
Comments
Error: Invalid count argument |
Hello @djkerya , This problem may appear when this module is dependant on some other module. For example, when you're using a module to create VPCs and then this module to peer them together in one Terraform run. The cause it that Terraform the data sources of this module cannot fetch required references, since those resources are not yet created. Notice, that the data sources are calculated as the first step of anu plan/apply operation. Here is an example of how to use this module with the Hope, this helps! |
Closing this issue due to no activity. |
It is just hilarious to close the issue independently it is solved or not.
сб, 26 мар. 2022 г., 16:21 Yurii Rochniak ***@***.***>:
… Closed #83
<#83>.
—
Reply to this email directly, view it on GitHub
<#83 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADDGNZZI2OY77AIY5CN4TGDVB4MOLANCNFSM5OCLD7MQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Error: Invalid count argument
│
│ on .terraform/modules/vpc-peering/main.tf line 59, in resource "aws_route" "this_routes":
│ 59: count = var.from_this ? length(local.this_routes) : 0
│
│ The "count" value depends on resource attributes that cannot be determined
│ until apply, so Terraform cannot predict how many instances will be created.
│ To work around this, use the -target argument to first apply only the
│ resources that the count depends on.
The text was updated successfully, but these errors were encountered: