terraform-aws-named-subnets
terraform-aws-named-subnets copied to clipboard
Cannot pass default acl ID from vpc module
Found a bug? Maybe our Slack Community can help.
Describe the Bug
Even though the variable private_network_acl_id
exists, if you pass it from the vpc module you get a count error
Error: Invalid count argument
on .terraform/modules/dev_subnets/private.tf line 56, in resource "aws_network_acl" "private":
56: count = module.this.enabled && var.type == "private" && signum(length(var.private_network_acl_id)) == 0 ? 1 : 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
I would expect to be able to pass the acl reference down. Perhaps this is a limitation in terraform?