Bring back vpn_gateway_create var in net-vpn-ha
This commit is contained in:
parent
e976d71428
commit
fcb697c935
|
@ -22,7 +22,7 @@ locals {
|
|||
: var.router_config.name
|
||||
)
|
||||
vpn_gateway = (
|
||||
var.vpn_gateway == null
|
||||
var.vpn_gateway_create
|
||||
? try(google_compute_ha_vpn_gateway.ha_gateway[0].self_link, null)
|
||||
: var.vpn_gateway
|
||||
)
|
||||
|
@ -30,7 +30,7 @@ locals {
|
|||
}
|
||||
|
||||
resource "google_compute_ha_vpn_gateway" "ha_gateway" {
|
||||
count = var.vpn_gateway == null ? 1 : 0
|
||||
count = var.vpn_gateway_create ? 1 : 0
|
||||
name = var.name
|
||||
project = var.project_id
|
||||
region = var.region
|
||||
|
|
|
@ -93,7 +93,13 @@ variable "tunnels" {
|
|||
}
|
||||
|
||||
variable "vpn_gateway" {
|
||||
description = "Self link of an existing HA VPN Gateway to use. Set to null to create new VPN Gateway."
|
||||
description = "HA VPN Gateway Self Link for using an existing HA VPN Gateway. Ignored if `vpn_gateway_create` is set to `true`."
|
||||
type = string
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "vpn_gateway_create" {
|
||||
description = "Create HA VPN Gateway."
|
||||
type = bool
|
||||
default = true
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue