Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
johnake committed Dec 18, 2023
1 parent 34277b3 commit c3e0bc5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
11 changes: 10 additions & 1 deletion dns/zones/resources.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ resource "azurerm_dns_caa_record" "caa_records" {
for zone in local.caa_records : "${zone.zone_name}.${zone.record_name}" => zone
}

name = each.value.record_name
name = "@"
zone_name = each.value.zone_name
resource_group_name = each.value.resource_group_name
ttl = 300
Expand All @@ -44,6 +44,15 @@ resource "azurerm_dns_caa_record" "caa_records" {
value = each.value.value
}

dynamic "record" {
for_each = var.settings
content {
flags = 0
tag = "issue"
value = record.value.value
}
}

depends_on = [
azurerm_dns_zone.dns_zone
]
Expand Down
13 changes: 1 addition & 12 deletions domains/infrastructure/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,7 @@ variable "azure_enable_monitoring" {

locals {
default_records = {
"caa_records" = {
"@" = {
"flags" = 0,
"tag" = "issue",
"value" = "globalsign.com"
},
"@" = {
"flags" = 0,
"tag" = "issue",
"value" = "digicert.com"
}
}
"caa_records" = ["globalsign.com", "digicert.com"],
"txt_records" = {
"@" = {
"value" = "v=spf1 -all"
Expand Down

0 comments on commit c3e0bc5

Please sign in to comment.