Skip to content

Commit 2506028

Browse files
committed
fix: rg name output should account for being optional
1 parent 7673610 commit 2506028

File tree

1 file changed

+2
-2
lines changed
  • modules/azure/azure-virtual-machine/buildingblock

1 file changed

+2
-2
lines changed

modules/azure/azure-virtual-machine/buildingblock/outputs.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ output "vm_public_ip" {
1919
}
2020

2121
output "resource_group_name" {
22-
value = azurerm_resource_group.vm_rg.name
22+
value = local.rg_name
2323
description = "The name of the resource group"
2424
}
2525

@@ -49,7 +49,7 @@ output "vm_identity_principal_id" {
4949
}
5050

5151
output "azure_portal_url" {
52-
value = "https://portal.azure.com/#@${data.azurerm_client_config.current.tenant_id}/resource/subscriptions/${data.azurerm_subscription.current.subscription_id}/resourceGroups/${azurerm_resource_group.vm_rg.name}/providers/Microsoft.Compute/virtualMachines/${var.vm_name}/overview"
52+
value = "https://portal.azure.com/#@${data.azurerm_client_config.current.tenant_id}/resource/subscriptions/${data.azurerm_subscription.current.subscription_id}/resourceGroups/${local.rg_name}/providers/Microsoft.Compute/virtualMachines/${var.vm_name}/overview"
5353
description = "Direct link to the VM in Azure Portal"
5454
}
5555

0 commit comments

Comments
 (0)