Skip to content

Commit

Permalink
Added autodiscover record support
Browse files Browse the repository at this point in the history
  • Loading branch information
skyfox675 committed May 2, 2021
1 parent 808f670 commit df4725d
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 9 deletions.
32 changes: 23 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:[email protected]"]
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"
}
```
11 changes: 11 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down

0 comments on commit df4725d

Please sign in to comment.