From 280017ed2c46e00f12ce795b829ddf64ea62c21d Mon Sep 17 00:00:00 2001 From: Chris Long Date: Mon, 29 Mar 2021 20:26:41 -0700 Subject: [PATCH] Fix Terraform outputs for Azure - Issue628 --- Azure/Terraform/locals.tf | 2 +- Azure/Terraform/outputs.tf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Azure/Terraform/locals.tf b/Azure/Terraform/locals.tf index aa1d8da..597dff9 100644 --- a/Azure/Terraform/locals.tf +++ b/Azure/Terraform/locals.tf @@ -4,5 +4,5 @@ locals { ata_url = "https://${azurerm_public_ip.wef-publicip.ip_address}" guacamole_url = "http://${azurerm_public_ip.logger-publicip.ip_address}:8080/guacamole" velociraptor_url = "https://${azurerm_public_ip.logger-publicip.ip_address}:9999" - exchange_url = "https://${azurerm_public_ip.exchange-publicip[0].ip_address}" + exchange_url = "https://${var.create_exchange_server ? azurerm_public_ip.exchange-publicip[0].ip_address : ""}" } diff --git a/Azure/Terraform/outputs.tf b/Azure/Terraform/outputs.tf index b4799d1..01c45b9 100644 --- a/Azure/Terraform/outputs.tf +++ b/Azure/Terraform/outputs.tf @@ -19,7 +19,7 @@ output "win10_public_ip" { } output "exchange_public_ip" { - value = azurerm_public_ip.exchange-publicip[0].ip_address + value = "${var.create_exchange_server ? azurerm_public_ip.exchange-publicip[0].ip_address : null}" } output "ata_url" { @@ -43,5 +43,5 @@ output "velociraptor_url" { } output "exchange_url" { - value = local.exchange_url + value = "${var.create_exchange_server ? local.exchange_url : null}" }