From 0474d29ea4dca135f47b6f14ae4e63ac5de730ef Mon Sep 17 00:00:00 2001 From: Michele Zanotti Date: Wed, 11 Dec 2024 16:20:47 +0000 Subject: [PATCH] fix: dns zone resource group --- main.tf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.tf b/main.tf index 3d91e8d..0806036 100644 --- a/main.tf +++ b/main.tf @@ -208,7 +208,7 @@ resource "azurerm_private_dns_zone" "flexible_postgres" { count = var.private_dns_zones.flexible_postgres == null ? 1 : 0 name = "${var.resource_prefix}.nebuly.postgres.database.azure.com" - resource_group_name = data.azurerm_resource_group.main.name + resource_group_name = var.private_dns_zones.flexible_postgres.resource_group_name } resource "azurerm_private_dns_zone_virtual_network_link" "flexible_postgres" { count = var.private_dns_zones.flexible_postgres == null ? 1 : 0 @@ -218,14 +218,14 @@ resource "azurerm_private_dns_zone_virtual_network_link" "flexible_postgres" { var.resource_prefix, local.virtual_network.name, ) - resource_group_name = var.private_dns_zones.flexible_postgres.resource_group_name + resource_group_name = data.azurerm_resource_group.main.name virtual_network_id = local.virtual_network.id private_dns_zone_name = azurerm_private_dns_zone.flexible_postgres[0].name } resource "azurerm_private_dns_zone" "key_vault" { count = var.private_dns_zones.key_vault == null ? 1 : 0 name = "privatelink.vaultcore.azure.net" - resource_group_name = data.azurerm_resource_group.main.name + resource_group_name = var.private_dns_zones.key_vault.resource_group_name } resource "azurerm_private_dns_zone_virtual_network_link" "key_vault" { count = var.private_dns_zones.key_vault == null ? 1 : 0 @@ -235,7 +235,7 @@ resource "azurerm_private_dns_zone_virtual_network_link" "key_vault" { var.resource_prefix, local.virtual_network.name, ) - resource_group_name = var.private_dns_zones.key_vault.resource_group_name + resource_group_name = data.azurerm_resource_group.main.name virtual_network_id = local.virtual_network.id private_dns_zone_name = azurerm_private_dns_zone.key_vault[0].name }