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" {