Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: makes dmarc_txt record optional. Defaults to true for backwards compt #130

Merged
merged 1 commit into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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