diff --git a/terraform/clouds/azure/postgres.tf b/terraform/clouds/azure/postgres.tf index 4d69a71..10d7aa2 100644 --- a/terraform/clouds/azure/postgres.tf +++ b/terraform/clouds/azure/postgres.tf @@ -8,14 +8,16 @@ resource "random_password" "password" { resource "azurerm_private_dns_zone" "postgres" { count = var.create_db ? 1 : 0 + name = "plrl.database.azure.com" resource_group_name = local.resource_group.name } resource "azurerm_private_dns_zone_virtual_network_link" "postgres" { count = var.create_db ? 1 : 0 + name = "plrl.postgres.com" - private_dns_zone_name = azurerm_private_dns_zone.postgres.name + private_dns_zone_name = azurerm_private_dns_zone.postgres[0].name virtual_network_id = azurerm_virtual_network.network.id resource_group_name = local.resource_group.name } @@ -27,7 +29,7 @@ resource "azurerm_postgresql_flexible_server" "postgres" { location = local.resource_group.location version = "13" delegated_subnet_id = azurerm_subnet.postgres.id - private_dns_zone_id = azurerm_private_dns_zone.postgres.id + private_dns_zone_id = azurerm_private_dns_zone.postgres[0].id administrator_login = "console" administrator_password = random_password.password.result zone = "1"