From fe0a9ed1387d59f4401994ae00657ef45962d9f0 Mon Sep 17 00:00:00 2001 From: Miren Esnaola Date: Wed, 2 Aug 2023 23:22:26 +0200 Subject: [PATCH] Fixed error of inconsistent conditional result types when evaluating local peer_gateway variable --- modules/net-ipsec-over-interconnect/main.tf | 5 ----- modules/net-ipsec-over-interconnect/outputs.tf | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/modules/net-ipsec-over-interconnect/main.tf b/modules/net-ipsec-over-interconnect/main.tf index 89c775b0c2..06294add99 100644 --- a/modules/net-ipsec-over-interconnect/main.tf +++ b/modules/net-ipsec-over-interconnect/main.tf @@ -15,11 +15,6 @@ */ locals { - peer_gateway = ( - var.peer_gateway_config.create - ? try(google_compute_external_vpn_gateway.default[0], null) - : var.peer_gateway_config - ) peer_gateway_id = ( var.peer_gateway_config.create ? try(google_compute_external_vpn_gateway.default[0].id, null) diff --git a/modules/net-ipsec-over-interconnect/outputs.tf b/modules/net-ipsec-over-interconnect/outputs.tf index 6d1099b1a7..e0ba83fd2f 100644 --- a/modules/net-ipsec-over-interconnect/outputs.tf +++ b/modules/net-ipsec-over-interconnect/outputs.tf @@ -24,7 +24,7 @@ output "bgp_peers" { output "external_gateway" { description = "External VPN gateway resource." - value = local.peer_gateway + value = try(google_compute_external_vpn_gateway.default[0], null) } output "id" {