From 67da6cf628a03a261b62296ce96976bc85802886 Mon Sep 17 00:00:00 2001 From: Houssem Dellai Date: Sun, 7 Jan 2024 17:34:00 +0100 Subject: [PATCH] edited tf versions --- 200_hub_spoke_firewall/{hub_bastion.tf => bastion.tf} | 2 +- 620_nat_gateway/output.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename 200_hub_spoke_firewall/{hub_bastion.tf => bastion.tf} (99%) diff --git a/200_hub_spoke_firewall/hub_bastion.tf b/200_hub_spoke_firewall/bastion.tf similarity index 99% rename from 200_hub_spoke_firewall/hub_bastion.tf rename to 200_hub_spoke_firewall/bastion.tf index 67acb78..7ba2a25 100644 --- a/200_hub_spoke_firewall/hub_bastion.tf +++ b/200_hub_spoke_firewall/bastion.tf @@ -4,4 +4,4 @@ module "bastion" { resource_group_name = azurerm_resource_group.rg-hub.name location = azurerm_resource_group.rg-hub.location subnet_id = azurerm_subnet.subnet-bastion.id -} +} \ No newline at end of file diff --git a/620_nat_gateway/output.tf b/620_nat_gateway/output.tf index 6bb8bcd..8d21294 100644 --- a/620_nat_gateway/output.tf +++ b/620_nat_gateway/output.tf @@ -3,5 +3,5 @@ output "pip-nat-gateway" { } output "ssh-bastion" { - value = "az network bastion ssh -n ${azurerm_bastion_host.bastion.name} -g ${azurerm_bastion_host.bastion.resource_group_name} --target-resource-id ${azurerm_linux_virtual_machine.vm.id} --auth-type ssh --username azureuser" + value = "az network bastion ssh -n ${try(azurerm_bastion_host.bastion.name, "")} -g ${try(azurerm_bastion_host.bastion.resource_group_name, "")} --target-resource-id ${try(azurerm_linux_virtual_machine.vm.id, "")} --auth-type ssh --username azureuser" }