Terraform module to configure various email related DNS records on Cloudflare.
Module that configures various email related DNS records on Cloudflare, including serving a MTA-STS policy text file via Cloudflare Workers. ## Features - Configure MX records. - Configure SPF record. - Configure DMARC record. - Configure SMTP TLS reporting record. - Configure MTA-STS record, generate `mta-sts.txt` policy file and serve it with a Cloudflare Worker on `https://mta-sts.map(object({
type = string
value = string
})) | `{}` | no |
| [mta_sts_max_age](#input_mta_sts_max_age) | Maximum lifetime of the policy in seconds, up to 31557600, defaults to 604800 (1 week) | `number` | `604800` | no |
| [mta_sts_mode](#input_mta_sts_mode) | MTA policy mode, https://tools.ietf.org/html/rfc8461#section-5 | `string` | `"testing"` | no |
| [mta_sts_mx](#input_mta_sts_mx) | Additional permitted MX hosts for the MTA STS policy. | `list(string)` | `[]` | no |
| [mx](#input_mx) | A map representing the MX records. Key is the priority and value is the mail server hostname. | `map(number)` | n/a | yes |
| [mx_subdomains](#input_mx_subdomains) | List of sub-domains to also apply MX records to. | `list(string)` | `[]` | no |
| [record_ttl](#input_record_ttl) | TTL for DNS records. `1` is auto. Default is `1`. | `number` | `1` | no |
| [spf_terms](#input_spf_terms) | List of SPF terms that should be included in the SPF TXT record. | `list(string)` | [| no | | [tlsrpt_rua](#input_tlsrpt_rua) | Locations to which aggregate TLS SMTP reports about policy violations should be sent, either `mailto:` or `https:` schema. | `list(string)` | n/a | yes | | [zone_id](#input_zone_id) | Cloudflare Zone ID | `string` | n/a | yes | ## Outputs | Name | Description | | ----------------------------------------------------------------------------------------- | ------------------------------- | | [mta_sts_policy_url](#output_mta_sts_policy_url) | URL to the MTA-STS policy file. |
"mx",
"a",
"~all"
]