Skip to content

Commit

Permalink
Merge pull request #15 from clouddrove/hurodata-48-n
Browse files Browse the repository at this point in the history
hurodata[48] Fix - storage account private endpoint is possible if it…
  • Loading branch information
d4kverma authored Apr 5, 2023
2 parents f5a35a3 + 255fa86 commit 6eb4046
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ resource "azurerm_private_endpoint" "pep" {
locals {
resource_group_name = var.resource_group_name
location = var.location
valid_rg_name = var.existing_private_dns_zone == null ? local.resource_group_name : var.existing_private_dns_zone_resource_group_name
valid_rg_name = var.existing_private_dns_zone == null ? local.resource_group_name : (var.existing_private_dns_zone_resource_group_name == "" ? local.resource_group_name : var.existing_private_dns_zone_resource_group_name)
private_dns_zone_name = var.existing_private_dns_zone == null ? join("", azurerm_private_dns_zone.dnszone.*.name) : var.existing_private_dns_zone
}

Expand All @@ -271,7 +271,7 @@ resource "azurerm_private_dns_zone" "dnszone" {
}

resource "azurerm_private_dns_zone_virtual_network_link" "vent-link" {
count = var.enabled && var.enable_private_endpoint && var.diff_sub == false ? 1 : 0
count = var.enabled && var.enable_private_endpoint && (var.existing_private_dns_zone != null ? (var.existing_private_dns_zone_resource_group_name == "" ? false : true) : true) && var.diff_sub == false ? 1 : 0
name = var.existing_private_dns_zone == null ? format("%s-pdz-vnet-link-storage", module.labels.id) : format("%s-pdz-vnet-link-storage-1", module.labels.id)
resource_group_name = local.valid_rg_name
private_dns_zone_name = local.private_dns_zone_name
Expand Down

0 comments on commit 6eb4046

Please sign in to comment.