Skip to content

Commit

Permalink
Add domain key support for protonmail
Browse files Browse the repository at this point in the history
  • Loading branch information
skyfox675 committed May 1, 2021
1 parent eb65630 commit 808f670
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
28 changes: 28 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,31 @@ resource "aws_route53_record" "github_this" {
var.github_verification_record
]
}

resource "aws_route53_record" "protonmail_domainkey_this" {
count = length(var.protonmail_domainkey) > 0 ? 1 : 0
zone_id = aws_route53_zone.this.zone_id
name = "protonmail._domainkey.${aws_route53_zone.this.name}"
type = "CNAME"
ttl = var.ttl

records = [var.protonmail_domainkey]
}
resource "aws_route53_record" "protonmail2_domainkey_this" {
count = length(var.protonmail2_domainkey) > 0 ? 1 : 0
zone_id = aws_route53_zone.this.zone_id
name = "protonmail2._domainkey.${aws_route53_zone.this.name}"
type = "CNAME"
ttl = var.ttl

records = [var.protonmail2_domainkey]
}
resource "aws_route53_record" "protonmail3_domainkey_this" {
count = length(var.protonmail3_domainkey) > 0 ? 1 : 0
zone_id = aws_route53_zone.this.zone_id
name = "protonmail3._domainkey.${aws_route53_zone.this.name}"
type = "CNAME"
ttl = var.ttl

records = [var.protonmail3_domainkey]
}
18 changes: 18 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,21 @@ variable "dmarc_value" {
default = []
type = list(string)
}

variable "protonmail_domainkey" {
description = "Value to use for the first Protonmail DKIM CNAME Record, this is given in the custom domain setup page."
default = ""
type = string
}

variable "protonmail2_domainkey" {
description = "Value to use for the second Protonmail DKIM CNAME Record, this is given in the custom domain setup page."
default = ""
type = string
}

variable "protonmail3_domainkey" {
description = "Value to use for the third Protonmail DKIM CNAME Record, this is given in the custom domain setup page"
default = ""
type = string
}

0 comments on commit 808f670

Please sign in to comment.