diff --git a/README.md b/README.md index 1a9ea77..03079ab 100644 --- a/README.md +++ b/README.md @@ -10,15 +10,29 @@ module "dnssec_key" { name = "my-dnssec-key" } -module "my_dnssec_zone" { - source = "Lupus-Metallum/r53-zone/aws" - version = "1.0.12" - - domain_name = "example.com" - dnssec = true - kms_key_arn = module.dnssec_key.key_arn - signing_key_name = "my-signing-key" - ttl = 300 +module "r53_zone_example_net" { + source = "Lupus-Metallum/r53-zone/aws" + version = "1.2.1" + domain_name = "example.net" + dnssec = true + amazon_caa_record = true + outlook_autodiscover = true + kms_key_arn = module.dnssec_key.key_arn + signing_key_name = "ExampleDefaultKey" + root_txt = [ + "protonmail-verification=0000000000000000000000", + "v=spf1 include:_spf.protonmail.ch -all" + ] + root_mx = [ + "10 mail.protonmail.ch.", + "20 mailsec.protonmail.ch." + ] + dmarc_value = ["v=DMARC1; p=quarantine; sp=quarantine; pct=100; rua=mailto:dmarc@example.net"] + protonmail_domainkey = "protonmail.domainkey.00000000000000000000000000000000000000000000000000000.domains.proton.ch." + protonmail2_domainkey = "protonmail2.domainkey.00000000000000000000000000000000000000000000000000000.domains.proton.ch." + protonmail3_domainkey = "protonmail3.domainkey.00000000000000000000000000000000000000000000000000000.domains.proton.ch." + github_verification_record = "000000000000" + github_org_name = "Lupus-Metallum" } ``` diff --git a/main.tf b/main.tf index 2b52859..aece1b4 100644 --- a/main.tf +++ b/main.tf @@ -67,6 +67,17 @@ resource "aws_route53_record" "caa_this" { ] } +resource "aws_route53_record" "outlook_autodiscover_this" { + count = var.outlook_autodiscover = true ? 1 : 0 + zone_id = aws_route53_zone.this.zone_id + name = "autodiscover.${aws_route53_zone.this.name}" + type = "CNAME" + ttl = var.ttl + records = [ + "autodiscover.outlook.com" + ] +} + resource "aws_route53_record" "github_this" { count = var.github_verification_record != "" && var.github_org_name != "" ? 1 : 0 zone_id = aws_route53_zone.this.zone_id diff --git a/variables.tf b/variables.tf index 8e0d2f9..3883d9f 100644 --- a/variables.tf +++ b/variables.tf @@ -32,6 +32,12 @@ variable "amazon_caa_record" { type = bool } +variable "outlook_autodiscover" { + description = "Should we create the autodiscover CNAME record that points to autodiscover.outlook.com?" + default = false + type = bool +} + variable "github_verification_record" { description = "Value of the GitHub verification record?" default = ""