From 0ca7a3fc4ab5b22bfb859ba6561ea3625ecf9509 Mon Sep 17 00:00:00 2001 From: Ken Sun Date: Mon, 28 Oct 2024 09:05:42 -0400 Subject: [PATCH] update --- ESLZ/front-door.tfvars | 1 + module.tf | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ESLZ/front-door.tfvars b/ESLZ/front-door.tfvars index 4b9a5cb..07a3776 100644 --- a/ESLZ/front-door.tfvars +++ b/ESLZ/front-door.tfvars @@ -9,6 +9,7 @@ front_doors ={ profile_sku = "Premium_AzureFrontDoor" # Options: Standard_AzureFrontDoor, Premium_AzureFrontDoor local_dns={ + add_local_dns_record = true local_dns_zone_name ="zone1" local_dns_record_name = "www" certificate_type = "ManagedCertificate" diff --git a/module.tf b/module.tf index 26c9054..672b2f5 100644 --- a/module.tf +++ b/module.tf @@ -138,7 +138,7 @@ resource "azurerm_cdn_frontdoor_custom_domain_association" "domain_association" resource "azurerm_dns_cname_record" "cname_record" { depends_on = [azurerm_cdn_frontdoor_route.route, azurerm_cdn_frontdoor_security_policy.fd_security_policy] - + count = try(var.front_door.local_dns.add_local_dns_record , false) != false ? 1 : 0 name = try(var.front_door.local_dns.local_dns_record_name, "www") zone_name = var.zones[try(var.front_door.local_dns.local_dns_zone_name, "zone1")].name resource_group_name = var.resource_groups["DNS"].name @@ -147,7 +147,7 @@ resource "azurerm_dns_cname_record" "cname_record" { } resource "azurerm_dns_txt_record" "txt_record" { - + count = try(var.front_door.local_dns.add_local_dns_record , false) != false ? 1 : 0 name = join(".", ["_dnsauth", "${var.front_door.local_dns.local_dns_record_name}"]) zone_name = var.zones[var.front_door.local_dns.local_dns_zone_name].name resource_group_name = var.resource_groups["DNS"].name