Skip to content

Commit f8c5010

Browse files
committed
updating private endpoint configuration
1 parent cc2ba58 commit f8c5010

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,10 @@ resource "azurerm_private_dns_zone" "dnszone1" {
280280
}
281281

282282
resource "azurerm_private_dns_zone_virtual_network_link" "vent-link1" {
283-
count = var.existing_private_dns_zone == null && var.enable_private_endpoint ? 1 : 0
283+
count = var.enable_private_endpoint ? 1 : 0
284284
name = "vnet-private-zone-link"
285285
resource_group_name = local.resource_group_name
286-
private_dns_zone_name = azurerm_private_dns_zone.dnszone1.0.name
286+
private_dns_zone_name = var.existing_private_dns_zone == null ? azurerm_private_dns_zone.dnszone1.0.name : var.existing_private_dns_zone
287287
virtual_network_id = var.existing_vnet_id == null ? data.azurerm_virtual_network.vnet01.0.id : var.existing_vnet_id
288288
registration_enabled = true
289289
tags = merge({ "Name" = format("%s", "vnet-private-zone-link") }, var.tags, )

0 commit comments

Comments
 (0)