From dc572e94fd26d83d5c8ab633132aa191c907eb80 Mon Sep 17 00:00:00 2001 From: Christian Carlsson Date: Wed, 4 Dec 2024 19:40:56 +0000 Subject: [PATCH] remove spf --- infrastructure/email.tf | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/infrastructure/email.tf b/infrastructure/email.tf index 6ad8e682..4c7d1e00 100644 --- a/infrastructure/email.tf +++ b/infrastructure/email.tf @@ -15,19 +15,10 @@ resource "aws_ses_domain_dkim" "getstronger" { } resource "aws_route53_record" "dkim" { - for_each = toset(aws_ses_domain_dkim.getstronger.dkim_tokens) - zone_id = aws_route53_zone.getstronger_pro.zone_id - name = "${each.value}._domainkey.getstronger.pro" - type = "CNAME" - ttl = 600 - records = ["${each.value}.dkim.amazonses.com"] -} - -resource "aws_route53_record" "spf" { + count = length(aws_ses_domain_dkim.getstronger.dkim_tokens) zone_id = aws_route53_zone.getstronger_pro.zone_id - name = "getstronger.pro" - type = "TXT" + name = "${aws_ses_domain_dkim.getstronger.dkim_tokens[count.index]}._domainkey.getstronger.pro" + type = "CNAME" ttl = 600 - records = ["v=spf1 include:amazonses.com ~all"] + records = ["${aws_ses_domain_dkim.getstronger.dkim_tokens[count.index]}.dkim.amazonses.com"] } -