File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
operations/deployment/terraform/modules/aws/certificates Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 11# Lookup for main domain.
22data "aws_route53_zone" "selected" {
3+ count = var. aws_r53_domain_name != " " ? 1 : 0
34 name = " ${ var . aws_r53_domain_name } ."
45 private_zone = false
56}
@@ -32,7 +33,7 @@ resource "aws_route53_record" "root_domain" {
3233 name = tolist (aws_acm_certificate. root_domain [0 ]. domain_validation_options )[0 ]. resource_record_name
3334 records = [tolist (aws_acm_certificate. root_domain [0 ]. domain_validation_options )[0 ]. resource_record_value ]
3435 type = tolist (aws_acm_certificate. root_domain [0 ]. domain_validation_options )[0 ]. resource_record_type
35- zone_id = data. aws_route53_zone . selected . zone_id
36+ zone_id = data. aws_route53_zone . selected [ 0 ] . zone_id
3637 ttl = 60
3738}
3839
@@ -59,7 +60,7 @@ resource "aws_route53_record" "sub_domain" {
5960 name = tolist (aws_acm_certificate. sub_domain [0 ]. domain_validation_options )[0 ]. resource_record_name
6061 records = [tolist (aws_acm_certificate. sub_domain [0 ]. domain_validation_options )[0 ]. resource_record_value ]
6162 type = tolist (aws_acm_certificate. sub_domain [0 ]. domain_validation_options )[0 ]. resource_record_type
62- zone_id = data. aws_route53_zone . selected . zone_id
63+ zone_id = data. aws_route53_zone . selected [ 0 ] . zone_id
6364 ttl = 60
6465}
6566
You can’t perform that action at this time.
0 commit comments