Skip to content

Commit

Permalink
fix: dns zone resource group
Browse files Browse the repository at this point in the history
  • Loading branch information
Telemaco019 committed Dec 11, 2024
1 parent c7d4380 commit 0474d29
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
}
Expand Down

0 comments on commit 0474d29

Please sign in to comment.