Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Sun committed Oct 28, 2024
1 parent cdd2988 commit 0ca7a3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions ESLZ/front-door.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions module.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 0ca7a3f

Please sign in to comment.