From d9170a4a949c60b3c6ae03d4de9e9e449907fa5d Mon Sep 17 00:00:00 2001 From: Nick Adams Date: Mon, 13 Sep 2021 09:07:48 -0500 Subject: [PATCH] Add Atlassian Cloud DKIM support --- README.md | 1 + main.tf | 18 ++++++++++++++++++ variables.tf | 6 ++++++ 3 files changed, 25 insertions(+) diff --git a/README.md b/README.md index ebb7877..3665228 100644 --- a/README.md +++ b/README.md @@ -44,5 +44,6 @@ module "r53_zone_example_net" { stripe_domainkey5 = "000000000000" stripe_domainkey6 = "000000000000" stripe_bounce = true + atlassian_cloud_dkim = true } ``` diff --git a/main.tf b/main.tf index 15d9c5d..bba0f67 100644 --- a/main.tf +++ b/main.tf @@ -197,4 +197,22 @@ resource "aws_route53_record" "o365_domainkey_this2" { ttl = var.ttl records = [var.ms_domainkey2] +} +resource "aws_route53_record" "atlassian_cloud_domainkey_this" { + count = var.atlassian_cloud_dkim == true ? 1 : 0 + zone_id = aws_route53_zone.this.zone_id + name = "s1._domainkey.${aws_route53_zone.this.name}" + type = "CNAME" + ttl = var.ttl + + records = ["s1._domainkey.atlassian.net."] +} +resource "aws_route53_record" "atlassian_cloud_domainkey_this2" { + count = var.atlassian_cloud_dkim == true ? 1 : 0 + zone_id = aws_route53_zone.this.zone_id + name = "s2._domainkey.${aws_route53_zone.this.name}" + type = "CNAME" + ttl = var.ttl + + records = ["s2._domainkey.atlassian.net."] } \ No newline at end of file diff --git a/variables.tf b/variables.tf index 9067607..4c2db3b 100644 --- a/variables.tf +++ b/variables.tf @@ -140,6 +140,12 @@ variable "stripe_bounce" { type = bool } +variable "atlassian_cloud_dkim" { + description = "Should we create the Atlassian Cloud DKIM cname records" + default = false + type = bool +} + variable "tags" { description = "Tags to apply to tag-able resources" default = {}