Skip to content

Commit 450bef6

Browse files
Update main.tf
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: payasam-raghuramakrishna-nttd <340229@nttdata.com>
1 parent a38318f commit 450bef6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ output "postgres_private_dns_zone_id" {
370370
resource "azurerm_private_dns_zone_virtual_network_link" "postgres_link_v2" {
371371
name = "${module.resource_names["private_dns_zone"].result}-link"
372372
resource_group_name = module.resource_group.name
373-
private_dns_zone_name = azurerm_private_dns_zone.postgres.name
373+
private_dns_zone_name = length(azurerm_private_dns_zone.postgres) > 0 ? azurerm_private_dns_zone.postgres[0].name : null
374374
virtual_network_id = module.network.vnet_id
375375
registration_enabled = false
376376
}

0 commit comments

Comments
 (0)