A Terraform module to configure mail configuration of a domain on a Cloudflare DNS zone the simpleway. It supports the current mail providers:
- Google;
- OVH;
- Cloudflare;
Mailcow (Not a provider, but I need it).
provider "cloudflare" {
email = ""
api_key = ""
version = "~> 4"
}
module "mx_domain_com" {
source = "tcarrondo/mx/cloudflare"
version = "~> 1"
domain = "domain.com"
email_provider = "google"
}
Name | Version |
---|---|
terraform | ~> 1 |
cloudflare | ~> 4 |
Name | Version |
---|---|
cloudflare | ~> 4 |
No modules.
Name | Type |
---|---|
cloudflare_email_routing_rule.this | resource |
cloudflare_email_routing_settings.this | resource |
cloudflare_record._dmarc | resource |
cloudflare_record.mx | resource |
cloudflare_record.mx_cf | resource |
cloudflare_record.spf | resource |
cloudflare_zone.domain | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
cloudflare_email_routings | n/a | map(object({ |
{} |
no |
dmarc | DMARC record | string |
"v=DMARC1; p=none; pct=100; rua=mailto:; ruf=mailto:; sp=none; aspf=r" |
no |
domain | Zone domain name | string |
n/a | yes |
dont_create_dmarc | Don't we need DMARC record | bool |
false |
no |
dont_create_spf | Don't we need SPF record | bool |
false |
no |
email_provider | E-mail service provider | string |
n/a | yes |
spf | Custom SPF record | string |
"" |
no |
No outputs.