From 3c2fa3ce7defa77de8984f30c00bcadb2a1e0733 Mon Sep 17 00:00:00 2001 From: Dennis Ploeger Date: Wed, 9 Jun 2021 09:11:47 +0200 Subject: [PATCH] fix: Fixed outputs and ipsec_policy block --- connections.tf | 12 +++++++++++- outputs.tf | 15 ++------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/connections.tf b/connections.tf index f9d0123..86e8ba4 100644 --- a/connections.tf +++ b/connections.tf @@ -15,7 +15,17 @@ resource "azurerm_virtual_network_gateway_connection" "connection" { local_network_gateway_id = azurerm_local_network_gateway.local.id shared_key = var.shared_key - ipsec_policy = var.ipsec_policy + dynamic "ipsec_policy" { + for_each = var.ipsec_policy + content { + dh_group = ipsec_policy.value["dh_group"] + ike_encryption = ipsec_policy.value["ike_encryption"] + ike_integrity = ipsec_policy.value["ike_integrity"] + ipsec_encryption = ipsec_policy.value["ipsec_encryption"] + ipsec_integrity = ipsec_policy.value["ipsec_integrity"] + pfs_group = ipsec_policy.value["pfs_group"] + } + } } data "azurerm_virtual_network" "target_vnet" { diff --git a/outputs.tf b/outputs.tf index d8ea1ab..b463710 100644 --- a/outputs.tf +++ b/outputs.tf @@ -1,14 +1,3 @@ -output "resource_group" { - description = "The name of the generated resource group" - value = azurerm_resource_group.azure-resource-group.name -} - -output "location" { - description = "The location input variable (can be used for dependency resolution)" - value = var.location -} - -output "ppg_id" { - description = "The ID of the generated proximity placement group" - value = azurerm_proximity_placement_group.ppg.id +output "vpn_ip" { + value = azurerm_public_ip.publicip.ip_address }