From 805818dfbd2a8cc689badecbc3a6b6b7f9a92305 Mon Sep 17 00:00:00 2001 From: Paris Kasidiaris Date: Thu, 24 Oct 2024 17:44:27 +0300 Subject: [PATCH] fix (ses): create feedback mx record --- aws/ses/route53.tf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/aws/ses/route53.tf b/aws/ses/route53.tf index 917a90f..42dc35a 100644 --- a/aws/ses/route53.tf +++ b/aws/ses/route53.tf @@ -15,3 +15,13 @@ resource "aws_route53_record" "domain_amazonses_dkim_record" { ttl = "3600" records = ["${element(aws_ses_domain_dkim.dkim.dkim_tokens, count.index)}.dkim.amazonses.com"] } + +resource "aws_route53_record" "domain_amazonses_feedback_mx_record" { + count = (var.route53_zone != null && var.mail_from_domain != null) ? 1 : 0 + + zone_id = var.route53_zone + name = var.mail_from_domain + type = "MX" + records = ["10 feedback-smtp.${var.region}.amazonaws.com", ] + ttl = 60 +}