Fixed error of inconsistent conditional result types when evaluating local peer_gateway variable

This commit is contained in:
Miren Esnaola 2023-08-02 23:22:26 +02:00
parent 6f3a484b9d
commit fe0a9ed138
2 changed files with 1 additions and 6 deletions

View File

@ -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)

View File

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