Have SES module create a default dmarc record (#14)
This commit is contained in:
1 parent
e8154d7bde
commit
774797c5c4
1 file changed
+9
@@ -3,6 +3,7 @@ locals {
|
|||||||
aws_ses_domain_identity.default.domain,
|
aws_ses_domain_identity.default.domain,
|
||||||
"_amazonses.${aws_ses_domain_identity.default.domain}"
|
"_amazonses.${aws_ses_domain_identity.default.domain}"
|
||||||
]
|
]
|
||||||
|
dmarc_domain = "_dmarc.${aws_ses_domain_identity.default.domain}"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "aws_ses_domain_identity" "default" {
|
resource "aws_ses_domain_identity" "default" {
|
||||||
@@ -34,6 +35,14 @@ resource "aws_route53_record" "spf_domain" {
|
|||||||
records = each.key == aws_ses_domain_identity.default.domain ? flatten([["v=spf1 include:amazonses.com -all"], var.extra_txt_records]) : ["v=spf1 include:amazonses.com -all"]
|
records = each.key == aws_ses_domain_identity.default.domain ? flatten([["v=spf1 include:amazonses.com -all"], var.extra_txt_records]) : ["v=spf1 include:amazonses.com -all"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "aws_route53_record" "dmarc_domain" {
|
||||||
|
zone_id = var.zone_id
|
||||||
|
name = local.dmarc_domain
|
||||||
|
type = "TXT"
|
||||||
|
ttl = "600"
|
||||||
|
records = ["v=DMARC1; p=none;"]
|
||||||
|
}
|
||||||
|
|
||||||
resource "aws_iam_policy" "main" {
|
resource "aws_iam_policy" "main" {
|
||||||
policy = data.aws_iam_policy_document.main.json
|
policy = data.aws_iam_policy_document.main.json
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user