https://github.com/rsclarke/terraform-cloudflare-no-email
SPF, DKIM and DMARC records for zones which do not send email.
https://github.com/rsclarke/terraform-cloudflare-no-email
cloudflare email security spam-protection terraform
Last synced: 4 months ago
JSON representation
SPF, DKIM and DMARC records for zones which do not send email.
- Host: GitHub
- URL: https://github.com/rsclarke/terraform-cloudflare-no-email
- Owner: rsclarke
- License: mit
- Created: 2021-02-06T01:37:24.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2026-04-03T02:14:16.000Z (4 months ago)
- Last Synced: 2026-04-03T11:47:20.129Z (4 months ago)
- Topics: cloudflare, email, security, spam-protection, terraform
- Language: HCL
- Homepage: https://registry.terraform.io/modules/rsclarke/no-email/cloudflare/latest
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# terraform-cloudflare-no-email
SPF, DKIM and DMARC records for zones which do not send email.
This creates a `cloudflare_record` resource for SPF, DKIM and DMARC of the given `zone_id`.
The SPF and DMARC policies are set to reject all and you must provide an email address for DMARC Aggregate and Failure reports, through the `dmarc_rua` and `dmarc_ruf` variables respectively.
## Usage
```terraform
resource "cloudflare_zone" "example_com" {
zone = "example.com"
}
module {
source = "rsclarke/no-email/cloudflare"
zone_id = cloudflare_zone.example_com.id
dmarc_rua = ["dmarc_rua@example.net"]
dmarc_ruf = ["dmarc_ruf@example.net", "dmarc_ruf@example.org"]
}
```
## Providers
| Name | Version |
|------|---------|
| cloudflare | `~>5.0` |
## Inputs
| Name | Description | Type | Required |
|------|-------------|------|:--------:|
| zone_id | Cloudflare Zone ID | `string` | yes |
| dmarc_rua | Email addresses for DMARC Aggregate reports (excluding `mailto:`), at least one and contains the `@` symbol. | `list(string)` | yes |
| dmarc_ruf | Email addresses for DMARC Failure (or Forensic) reports (excluding `mailto:`), at least one and contains the `@` symbol. | `list(string)` | yes |
## Outputs
This module does not expose any outputs.