mirror of
https://github.com/jimeh/terraform-cloudflare-email.git
synced 2026-02-19 09:56:40 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fb19a11aae | |||
|
|
3616fc221d | ||
|
2738e7c7a1
|
|||
|
4a2a48a9e7
|
|||
|
1691c6fa76
|
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
".": "0.0.1"
|
".": "0.0.2"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [0.0.2](https://github.com/jimeh/terraform-cloudflare-email/compare/v0.0.1...v0.0.2) (2023-04-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **docs:** add README.md to release-please extra-files ([2738e7c](https://github.com/jimeh/terraform-cloudflare-email/commit/2738e7c7a1a456a687dc645abe3c0d6ad1abf42a))
|
||||||
|
* **docs:** correctly describe mx variable ([1691c6f](https://github.com/jimeh/terraform-cloudflare-email/commit/1691c6fa760f5a44bc30e733349294035cde502a))
|
||||||
|
|
||||||
## 0.0.1 (2023-04-26)
|
## 0.0.1 (2023-04-26)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
66
README.md
66
README.md
@@ -38,6 +38,70 @@ including serving a MTA-STS policy text file via Cloudflare Workers.
|
|||||||
`https://mta-sts.<your-domain>/.well-known/mta-sts.txt`.
|
`https://mta-sts.<your-domain>/.well-known/mta-sts.txt`.
|
||||||
- Configure domain key records (`<selector>._domainkey.<your-domain>`).
|
- Configure domain key records (`<selector>._domainkey.<your-domain>`).
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
<!-- x-release-please-start-version -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Gmail</summary>
|
||||||
|
|
||||||
|
```terraform
|
||||||
|
module "email" {
|
||||||
|
source = "jimeh/email/cloudflare"
|
||||||
|
version = "0.0.2"
|
||||||
|
|
||||||
|
account_id = var.cloudflare_account_id
|
||||||
|
zone_id = var.cloudflare_zone_id
|
||||||
|
|
||||||
|
mx = {
|
||||||
|
"aspmx.l.google.com" = 1
|
||||||
|
"alt1.aspmx.l.google.com" = 5
|
||||||
|
"alt2.aspmx.l.google.com" = 5
|
||||||
|
"alt3.aspmx.l.google.com" = 10
|
||||||
|
"alt4.aspmx.l.google.com" = 10
|
||||||
|
}
|
||||||
|
|
||||||
|
spf_terms = [
|
||||||
|
"include:_spf.google.com",
|
||||||
|
"~all",
|
||||||
|
]
|
||||||
|
|
||||||
|
mta_sts_mode = "enforce"
|
||||||
|
mta_sts_max_age = 86400
|
||||||
|
mta_sts_mx = [
|
||||||
|
"*.aspmx.l.google.com",
|
||||||
|
"*.googlemail.com",
|
||||||
|
"aspmx.l.google.com",
|
||||||
|
]
|
||||||
|
tlsrpt_rua = [
|
||||||
|
"mailto:tls-report@${var.cloudflare_zone_name}",
|
||||||
|
]
|
||||||
|
|
||||||
|
dmarc_policy = "reject"
|
||||||
|
dmarc_rua = [
|
||||||
|
"mailto:dmarc-report@${var.cloudflare_zone_name}",
|
||||||
|
]
|
||||||
|
|
||||||
|
domainkeys = {
|
||||||
|
"google" = {
|
||||||
|
type = "TXT"
|
||||||
|
value = join("", [
|
||||||
|
"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApAVNwJ9",
|
||||||
|
"+6ArXN23ZaR8SFSYxVEEbbHRZplZqHVt6uEpcirY+jxHOqV2bvqAY3BHZQs/KoHnFSWUf",
|
||||||
|
"6zv6ajZgUxvU65UhCbrQ7CwrJCjU8sQFDk+CpbvmXyJIe9G470HuGEs4NmQDoddJZr09V",
|
||||||
|
"7d3anX8n7ePSCsIxwGi53DMhwijQXqHYMFALml+QIMZ/03ydL6/B3EwDNDFSBSEqzt2QS",
|
||||||
|
"N43EYb3FlUiGu5NGHl3gibEsbywTmGtN3kmkp/rxqaJPLv16NVpTe+0lAqPiq/pgJT4pp",
|
||||||
|
"ACz2ENh6BD0H+hDiCKBiw+gyAeDbOn1c5yslENSEyDxqpn17tnxo+O/ZFmwIDAQAB"
|
||||||
|
])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<!-- x-release-please-end -->
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
| Name | Version |
|
| Name | Version |
|
||||||
@@ -89,7 +153,7 @@ No modules.
|
|||||||
| <a name="input_mta_sts_max_age"></a> [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 |
|
| <a name="input_mta_sts_max_age"></a> [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 |
|
||||||
| <a name="input_mta_sts_mode"></a> [mta_sts_mode](#input_mta_sts_mode) | MTA policy mode, https://tools.ietf.org/html/rfc8461#section-5 | `string` | `"testing"` | no |
|
| <a name="input_mta_sts_mode"></a> [mta_sts_mode](#input_mta_sts_mode) | MTA policy mode, https://tools.ietf.org/html/rfc8461#section-5 | `string` | `"testing"` | no |
|
||||||
| <a name="input_mta_sts_mx"></a> [mta_sts_mx](#input_mta_sts_mx) | Additional permitted MX hosts for the MTA STS policy. | `list(string)` | `[]` | no |
|
| <a name="input_mta_sts_mx"></a> [mta_sts_mx](#input_mta_sts_mx) | Additional permitted MX hosts for the MTA STS policy. | `list(string)` | `[]` | no |
|
||||||
| <a name="input_mx"></a> [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 |
|
| <a name="input_mx"></a> [mx](#input_mx) | A map representing the MX records. Key is the mail server hostname and value is the priority. | `map(number)` | n/a | yes |
|
||||||
| <a name="input_mx_subdomains"></a> [mx_subdomains](#input_mx_subdomains) | List of sub-domains to also apply MX records to. | `list(string)` | `[]` | no |
|
| <a name="input_mx_subdomains"></a> [mx_subdomains](#input_mx_subdomains) | List of sub-domains to also apply MX records to. | `list(string)` | `[]` | no |
|
||||||
| <a name="input_record_ttl"></a> [record_ttl](#input_record_ttl) | TTL for DNS records. `1` is auto. Default is `1`. | `number` | `1` | no |
|
| <a name="input_record_ttl"></a> [record_ttl](#input_record_ttl) | TTL for DNS records. `1` is auto. Default is `1`. | `number` | `1` | no |
|
||||||
| <a name="input_spf_terms"></a> [spf_terms](#input_spf_terms) | List of SPF terms that should be included in the SPF TXT record. | `list(string)` | <pre>[<br> "mx",<br> "a",<br> "~all"<br>]</pre> | no |
|
| <a name="input_spf_terms"></a> [spf_terms](#input_spf_terms) | List of SPF terms that should be included in the SPF TXT record. | `list(string)` | <pre>[<br> "mx",<br> "a",<br> "~all"<br>]</pre> | no |
|
||||||
|
|||||||
@@ -7,7 +7,9 @@
|
|||||||
"bump-patch-for-minor-pre-major": true,
|
"bump-patch-for-minor-pre-major": true,
|
||||||
"draft": false,
|
"draft": false,
|
||||||
"prerelease": false,
|
"prerelease": false,
|
||||||
"initial-version": "0.0.1"
|
"extra-files": [
|
||||||
|
"README.md"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
|
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ variable "record_ttl" {
|
|||||||
|
|
||||||
variable "mx" {
|
variable "mx" {
|
||||||
type = map(number)
|
type = map(number)
|
||||||
description = "A map representing the MX records. Key is the priority and value is the mail server hostname."
|
description = "A map representing the MX records. Key is the mail server hostname and value is the priority."
|
||||||
|
|
||||||
validation {
|
validation {
|
||||||
condition = length(var.mx) > 0
|
condition = length(var.mx) > 0
|
||||||
|
|||||||
Reference in New Issue
Block a user