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
│ Error: Invalid count argument
│
│ on .terraform/modules/cdn/main.tf line 103, in resource "aws_cloudfront_origin_access_identity" "default":
│ 103: count = local.create_cloudfront_origin_access_identity ? 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.
This local variable is defined as:
locals {
enabled=module.this.enabledcreate_cloudfront_origin_access_identity=local.enabled&&length(compact([var.cloudfront_origin_access_identity_iam_arn])) ==0# "" or null
}
I'm not 100% clear why this fails, but I believe it's because module.this.enabled can't be determined from static data.
Environment (please complete the following information):
Anything that will help us triage the bug will help. Here are some ideas:
Terraform 1.2.6
The text was updated successfully, but these errors were encountered:
Found a bug? Maybe our Slack Community can help.
Describe the Bug
Code:
Gives error:
This local variable is defined as:
I'm not 100% clear why this fails, but I believe it's because
module.this.enabled
can't be determined from static data.Environment (please complete the following information):
Anything that will help us triage the bug will help. Here are some ideas:
Terraform 1.2.6
The text was updated successfully, but these errors were encountered: