I'm not able to use more than one source aliases for the redirect like shown in the default example.
"mediapopinc.com." = ["mediapopinc.com", "www.mediapopinc.com"]
This is failing with following error:
Error: Invalid for_each argument
│
│ on .terraform/modules/redirect0.certificate/main.tf line 26, in resource "aws_route53_record" "record":
│ 26: for_each = {
│ 27: // Asking for aws_acm_certificate.cert.0 will raise an exception when no certificate is being setup.
│ 28: for dvo in flatten(aws_acm_certificate.cert.*.domain_validation_options) : dvo.domain_name => {
│ 29: name = dvo.resource_record_name
│ 30: value = dvo.resource_record_value
│ 31: type = dvo.resource_record_type
│ 32: zone_id = data.aws_route53_zone.zone[local.host_to_zone[dvo.domain_name]].zone_id
│ 33: }
│ 34: }
│ ├────────────────
│ │ aws_acm_certificate.cert is tuple with 1 element
│ │ data.aws_route53_zone.zone is object with 1 attribute "awstest.adesso-test.de."
│ │ local.host_to_zone is object with 2 attributes
│
│ The "for_each" 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 for_each depends on.
Hi,
I'm not able to use more than one source aliases for the redirect like shown in the default example.
"mediapopinc.com." = ["mediapopinc.com", "www.mediapopinc.com"]
This is failing with following error:Version Info:
It's working only with one entry behind the domain, f.eg.
"mediapopinc.com." = ["mediapopinc.com"]
I've also tried to apply with target option for different ressources but with no success. Any ideas? Thanks!