Loading...
Loading...
### Terraform Version ```shell v1.11.3 ``` ### Terraform Configuration Files ```terraform resource "aws_cloudfront_distribution" "radix-cdn-cloudfront" { aliases = [local.cluster.domain.radix_cdn] enabled = true origin { domain_name = coalesce(local.cluster.domain.radix, "stub") origin_id = local.radix-cdn-id .... } origin { domain_name = local.cluster.domain.radix_unbranded origin_id = local.radix-unbranded-cdn-id ... } } ``` ### Debug Output ``` │ Error: origin.0.domain_name must not be empty, got │ │ with module.cdn[0].aws_cloudfront_distribution.radix-cdn-cloudfront, │ on modules/cdn/cloudfront.tf line 124, in resource "aws_cloudfront_distribution" "radix-cdn-cloudfront": │ 124: resource "aws_cloudfront_distribution" "radix-cdn-cloudfront" { ``` ### Expected Behavior Here the problem with the second `origin`, thus I expect index to be 1 instead of 0: ``` origin.1.domain_name must not be empty, got ``` ### Actual Behavior TF reports that error is located at resource with index 0. ### Steps to Reproduce To resolve the issue apply the next changes to the second `origin`: ```diff - domain_name = local.cluster.domain.radix_unbranded + domain_name = coalesce( local.cluster.domain.radix_unbranded, "stub" ) ``` ### Additional Context Also `got` looks weird. I expect it should be `Error: origin.1.domain_name must not be empty, got ""`. Otherwise it looks like unfinished sentence. ### References _No response_ ### Generative AI / LLM assisted development? _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.