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
$ terraform apply
[...]
│ Error: Invalid count argument
│
│ on .terraform/modules/red5pro/main.tf line 162, in resource "aws_subnet" "red5pro_subnets":
│ 162: count = var.vpc_create ? length(data.aws_availability_zones.available[0].names) : 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.
╵
Expected behavior
Ability to apply all ressource on first apply
Actual behavior
Can't apply without target module.red5pro.data.aws_availability_zones.available
Typically, this process works without issues, and we haven’t encountered this problem in our tests. However, if you’re still experiencing the issue, you need to use terraform apply -target module.red5pro.data.aws_availability_zones.available
Additionally, consider updating to the latest version of Terraform.
Description
Hello,
There seems to be a circular dependency around
data.aws_availability_zones.available
when using the module, which prevents the creation of resources.The first time I used the module, I have no problem, after few apply/destroy with the same code, the bug appears.
Versions
Module version 1.1.12
Terraform version:
Reproduction Code
Steps to reproduce the behavior:
Expected behavior
Ability to apply all ressource on first apply
Actual behavior
Can't apply without target
module.red5pro.data.aws_availability_zones.available
Terminal Output Screenshot(s)
The text was updated successfully, but these errors were encountered: