Skip to content

Commit

Permalink
Merge pull request #130 from trussworks/barry-#110
Browse files Browse the repository at this point in the history
feat: makes dmarc_txt record optional. Defaults to true for backwards compt
  • Loading branch information
esacteksab authored Nov 16, 2022
2 parents 9a17895 + 0cd954d commit 1cb288b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ No modules.
| dmarc\_p | DMARC Policy for organizational domains (none, quarantine, reject). | `string` | `"none"` | no |
| dmarc\_rua | DMARC Reporting URI of aggregate reports, expects an email address. | `string` | n/a | yes |
| domain\_name | The domain name to configure SES. | `string` | n/a | yes |
| enable\_dmarc | Control whether to create DMARC TXT record. | `bool` | `true` | no |
| enable\_incoming\_email | Control whether or not to handle incoming emails. | `bool` | `true` | no |
| enable\_spf\_record | Control whether or not to set SPF records. | `bool` | `true` | no |
| enable\_verification | Control whether or not to verify SES DNS records. | `bool` | `true` | no |
Expand Down
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ resource "aws_route53_record" "mx_receive" {
# DMARC TXT Record
#
resource "aws_route53_record" "txt_dmarc" {
count = var.enable_dmarc ? 1 : 0

zone_id = var.route53_zone_id
name = "_dmarc.${var.domain_name}"
type = "TXT"
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ variable "enable_verification" {
default = true
}

variable "enable_dmarc" {
description = "Control whether to create DMARC TXT record."
type = bool
default = true
}

variable "from_addresses" {
description = "List of email addresses to catch bounces and rejections."
type = list(string)
Expand Down

0 comments on commit 1cb288b

Please sign in to comment.