diff --git a/infrastructure/email.tf b/infrastructure/email.tf index 4a5557d6..c497dc31 100644 --- a/infrastructure/email.tf +++ b/infrastructure/email.tf @@ -13,3 +13,12 @@ resource "aws_route53_record" "ses_verification" { resource "aws_ses_domain_dkim" "getstronger" { domain = aws_ses_domain_identity.getstronger.domain } + +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"] +}