Skip to content

Commit 11f2625

Browse files
authored
fix (ses): set mail from txt record (#16)
2 parents bff883c + 472e488 commit 11f2625

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

aws/ses/route53.tf

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ resource "aws_route53_record" "domain_amazonses_feedback_mx_record" {
2222
zone_id = var.route53_zone
2323
name = var.mail_from_domain
2424
type = "MX"
25-
records = ["10 feedback-smtp.${var.region}.amazonaws.com", ]
25+
records = ["10 feedback-smtp.${var.region}.amazonaws.com"]
26+
ttl = 60
27+
}
28+
29+
resource "aws_route53_record" "domain_amazonses_feedback_txt_record" {
30+
count = (var.route53_zone != null && var.mail_from_domain != null) ? 1 : 0
31+
32+
zone_id = var.route53_zone
33+
name = var.mail_from_domain
34+
type = "TXT"
35+
records = ["v=spf1 include:amazonses.com ~all"]
2636
ttl = 60
2737
}

0 commit comments

Comments
 (0)