-
-
Notifications
You must be signed in to change notification settings - Fork 241
Description
facing this error after upgrade to terraform 0.12
Error: Missing resource instance key
on modules/aws-acm/main.tf line 29, in resource "aws_route53_record" "validation":
29: name = "${lookup(aws_acm_certificate.this.domain_validation_options[count.index], "resource_record_name")}"
Because aws_acm_certificate.this has "count" set, its attributes must be
accessed on specific instances.
For example, to correlate with indices of a referring resource, use:
aws_acm_certificate.this[count.index]
Error: Missing resource instance key
on modules/aws-acm/main.tf line 30, in resource "aws_route53_record" "validation":
30: type = "${lookup(aws_acm_certificate.this.domain_validation_options[count.index], "resource_record_type")}"
Because aws_acm_certificate.this has "count" set, its attributes must be
accessed on specific instances.
For example, to correlate with indices of a referring resource, use:
aws_acm_certificate.this[count.index]
Error: Missing resource instance key
on modules/aws-acm/main.tf line 34, in resource "aws_route53_record" "validation":
34: "${lookup(aws_acm_certificate.this.domain_validation_options[count.index], "resource_record_value")}"
Because aws_acm_certificate.this has "count" set, its attributes must be
accessed on specific instances.
For example, to correlate with indices of a referring resource, use:
aws_acm_certificate.this[count.index]