Skip to content

Commit

Permalink
updating atlassian record formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
LumosViridi committed Aug 13, 2022
1 parent 10c6e41 commit e30038c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 11 deletions.
28 changes: 19 additions & 9 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -198,21 +198,31 @@ resource "aws_route53_record" "o365_domainkey_this2" {

records = [var.ms_domainkey2]
}
resource "aws_route53_record" "atlassian_cloud_domainkey_this" {
count = var.atlassian_cloud_dkim == true ? 1 : 0
resource "aws_route53_record" "atlassian_cloud_primary_dkim" {
count = var.atlassian_cloud_primary_dkim != "" ? 1 : 0
zone_id = aws_route53_zone.this.zone_id
name = "s1._domainkey.${aws_route53_zone.this.name}"
name = "atlassian-${var.atlassian_cloud_primary_dkim}._domainkey.${aws_route53_zone.this.name}"
type = "CNAME"
ttl = var.ttl

records = ["s1._domainkey.atlassian.net."]
records = ["atlassian-${var.atlassian_cloud_primary_dkim}.dkim.atlassian.net."]
}
resource "aws_route53_record" "atlassian_cloud_domainkey_this2" {
count = var.atlassian_cloud_dkim == true ? 1 : 0
resource "aws_route53_record" "atlassian_cloud_fallback_dkim" {
count = var.atlassian_cloud_fallback_dkim != "" ? 1 : 0
zone_id = aws_route53_zone.this.zone_id
name = "s2._domainkey.${aws_route53_zone.this.name}"
name = "atlassian-${var.atlassian_cloud_fallback_dkim}._domainkey.${aws_route53_zone.this.name}"
type = "CNAME"
ttl = var.ttl

records = ["s2._domainkey.atlassian.net."]
}
records = ["atlassian-${var.atlassian_cloud_fallback_dkim}.dkim.atlassian.net."]
}

resource "aws_route53_record" "atlassian_cloud_bounce" {
count = var.atlassian_cloud_bounce == true ? 1 : 0
zone_id = aws_route53_zone.this.zone_id
name = "atlassian-bounces.${aws_route53_zone.this.name}"
type = "CNAME"
ttl = var.ttl

records = ["bounces.mail-us.atlassian.net."]
}
14 changes: 12 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,21 @@ variable "stripe_bounce" {
type = bool
}

variable "atlassian_cloud_dkim" {
description = "Should we create the Atlassian Cloud DKIM cname records"
variable "atlassian_cloud_bounce" {
description = "Should we create the Atlassian Cloud bounce cname record"
default = false
type = bool
}
variable "atlassian_cloud_primary_dkim" {
description = "Should we create the Atlassian Cloud DKIM primary cname record"
default = ""
type = string
}
variable "atlassian_cloud_fallback_dkim" {
description = "Should we create the Atlassian Cloud DKIM fallback cname record"
default = ""
type = string
}

variable "tags" {
description = "Tags to apply to tag-able resources"
Expand Down

0 comments on commit e30038c

Please sign in to comment.