From a015bd1993917c531da34e0a553eafb498e64a68 Mon Sep 17 00:00:00 2001 From: Eunsoo Shin Date: Sat, 2 Mar 2024 17:01:24 -0500 Subject: [PATCH 1/4] fix(route53): multivalue txt records to allow certbot to add acme-challenge records --- terraform/modules/domain/main.tf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/terraform/modules/domain/main.tf b/terraform/modules/domain/main.tf index 88b3b10d..31841d98 100644 --- a/terraform/modules/domain/main.tf +++ b/terraform/modules/domain/main.tf @@ -28,6 +28,8 @@ resource "aws_route53_record" "spf" { type = "TXT" ttl = 3600 records = ["v=spf1 include:mailgun.org ~all"] + multivalue_answer_routing_policy = true + set_identifier = "spf" } resource "aws_route53_record" "mailgun" { @@ -36,6 +38,8 @@ resource "aws_route53_record" "mailgun" { type = "CNAME" ttl = 3600 records = ["mailgun.org."] + multivalue_answer_routing_policy = true + set_identifier = "mailgun" } resource "aws_route53_record" "gmail" { From 008203083e469d5d1113afa89c427caece57a1d9 Mon Sep 17 00:00:00 2001 From: Eunsoo Shin Date: Sat, 2 Mar 2024 17:05:42 -0500 Subject: [PATCH 2/4] chore(lint) --- terraform/modules/domain/main.tf | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/terraform/modules/domain/main.tf b/terraform/modules/domain/main.tf index 31841d98..dc987c94 100644 --- a/terraform/modules/domain/main.tf +++ b/terraform/modules/domain/main.tf @@ -23,23 +23,23 @@ resource "aws_route53_record" "wildcard" { } resource "aws_route53_record" "spf" { - zone_id = aws_route53_zone.domain.zone_id - name = "" - type = "TXT" - ttl = 3600 - records = ["v=spf1 include:mailgun.org ~all"] + zone_id = aws_route53_zone.domain.zone_id + name = "" + type = "TXT" + ttl = 3600 + records = ["v=spf1 include:mailgun.org ~all"] multivalue_answer_routing_policy = true - set_identifier = "spf" + set_identifier = "spf" } resource "aws_route53_record" "mailgun" { - zone_id = aws_route53_zone.domain.zone_id - name = "email" - type = "CNAME" - ttl = 3600 - records = ["mailgun.org."] + zone_id = aws_route53_zone.domain.zone_id + name = "email" + type = "CNAME" + ttl = 3600 + records = ["mailgun.org."] multivalue_answer_routing_policy = true - set_identifier = "mailgun" + set_identifier = "mailgun" } resource "aws_route53_record" "gmail" { From d0b59555bbe971d2a48d1e62e084464bc1148baa Mon Sep 17 00:00:00 2001 From: Joy Liu Date: Sat, 2 Mar 2024 18:39:41 -0500 Subject: [PATCH 3/4] :bug: Fix --- terraform/modules/domain/main.tf | 2 -- 1 file changed, 2 deletions(-) diff --git a/terraform/modules/domain/main.tf b/terraform/modules/domain/main.tf index dc987c94..2fb17a8a 100644 --- a/terraform/modules/domain/main.tf +++ b/terraform/modules/domain/main.tf @@ -38,8 +38,6 @@ resource "aws_route53_record" "mailgun" { type = "CNAME" ttl = 3600 records = ["mailgun.org."] - multivalue_answer_routing_policy = true - set_identifier = "mailgun" } resource "aws_route53_record" "gmail" { From c4f41632ca4ab83782c1b7f74a07cc4c66e3ed3b Mon Sep 17 00:00:00 2001 From: Joy Liu Date: Sat, 2 Mar 2024 18:41:00 -0500 Subject: [PATCH 4/4] :art: Lint --- terraform/modules/domain/main.tf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/terraform/modules/domain/main.tf b/terraform/modules/domain/main.tf index 2fb17a8a..7a0d9f3e 100644 --- a/terraform/modules/domain/main.tf +++ b/terraform/modules/domain/main.tf @@ -33,11 +33,11 @@ resource "aws_route53_record" "spf" { } resource "aws_route53_record" "mailgun" { - zone_id = aws_route53_zone.domain.zone_id - name = "email" - type = "CNAME" - ttl = 3600 - records = ["mailgun.org."] + zone_id = aws_route53_zone.domain.zone_id + name = "email" + type = "CNAME" + ttl = 3600 + records = ["mailgun.org."] } resource "aws_route53_record" "gmail" {