diff --git a/infrastructure/ssl.tf b/infrastructure/ssl.tf index 40c30220..2ce784bb 100644 --- a/infrastructure/ssl.tf +++ b/infrastructure/ssl.tf @@ -10,17 +10,17 @@ resource "aws_acm_certificate" "getstronger_pro_ssl_cert" { validation_method = "DNS" } -# resource "aws_route53_record" "getstronger_pro_ssl_cert" { -# for_each = { -# for dvo in aws_acm_certificate.getstronger_pro_ssl_cert.domain_validation_options : dvo.domain_name => dvo -# } -# -# name = each.value.resource_record_name -# type = each.value.resource_record_type -# zone_id = aws_route53_zone.getstronger_pro.zone_id -# records = [each.value.resource_record_value] -# ttl = 60 -# } +resource "aws_route53_record" "getstronger_pro_ssl_cert" { + for_each = { + for dvo in aws_acm_certificate.getstronger_pro_ssl_cert.domain_validation_options : dvo.domain_name => dvo + } + + name = each.value.resource_record_name + type = each.value.resource_record_type + zone_id = aws_route53_zone.getstronger_pro.zone_id + records = [each.value.resource_record_value] + ttl = 60 +} # Obtain an SSL certificate resource "aws_acm_certificate" "www_getstronger_pro_ssl_cert" {