Skip to content

Commit e6cc092

Browse files
committed
Bug fix for ACM records
1 parent c52acab commit e6cc092

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

static-site/acm.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ resource "aws_acm_certificate" "cloudfront_cert" {
77

88
resource "aws_acm_certificate_validation" "cert_validation" {
99
certificate_arn = aws_acm_certificate.cloudfront_cert.arn
10-
validation_record_fqdns = [for record in aws_route53_zone.hosted_zone : record.fqdn]
10+
validation_record_fqdns = [for record in aws_route53_record.acm_records : record.fqdn]
1111
}

static-site/data.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ data "aws_iam_policy_document" "deploy_web" {
6262

6363
data "aws_route53_zone" "hosted_zone" {
6464
name = var.domain_name
65+
private_zone = false
6566
}
6667

6768
data "aws_iam_openid_connect_provider" "github" {

static-site/route53.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ resource "aws_route53_record" "acm_records" {
1616
records = [each.value.record]
1717
ttl = 60
1818
type = each.value.type
19-
zone_id = aws_route53_zone.hosted_zone.zone_id
19+
zone_id = data.aws_route53_zone.hosted_zone.zone_id
2020
}
2121

2222
#############################################

0 commit comments

Comments
 (0)