Parametrized more hardcoded values.
This commit is contained in:
@@ -71,7 +71,7 @@ module "gw" {
|
||||
name = "${var.hub.name}-vpn"
|
||||
network_name = module.hub_network.name
|
||||
region = var.hub.region
|
||||
vpn_external_ip = "vpw-gw-us-west1"
|
||||
vpn_external_ip = var.vpn_external_ip
|
||||
}
|
||||
|
||||
module "to_lazurowa" {
|
||||
@@ -81,14 +81,8 @@ module "to_lazurowa" {
|
||||
peer_ip = var.peer_ip
|
||||
shared_secret = var.shared_secret
|
||||
|
||||
local_selectors = [
|
||||
var.hub.cidr,
|
||||
var.spoke.cidr
|
||||
]
|
||||
|
||||
remote_selectors = [
|
||||
"192.168.2.0/24", "192.168.10.0/24"
|
||||
]
|
||||
local_selectors = [var.hub.cidr, var.spoke.cidr]
|
||||
remote_selectors = var.remote_selectors
|
||||
|
||||
depends_on = [module.gw]
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ variable "region" {
|
||||
}
|
||||
|
||||
variable "vpn_external_ip" {
|
||||
description = "The name of the external IP address of the VPN Gateway."
|
||||
description = "External IP address for the VPN gateway. If not provided, a new IP will be allocated."
|
||||
type = string
|
||||
nullable = true
|
||||
default = null
|
||||
|
||||
+9
-3
@@ -19,7 +19,6 @@ variable "spoke" {
|
||||
}
|
||||
|
||||
variable "ssh" {
|
||||
description = "SSH Key(s) definition"
|
||||
type = list(object({
|
||||
public_key = string
|
||||
ssh_user = string
|
||||
@@ -31,13 +30,20 @@ variable "ssh" {
|
||||
}]
|
||||
}
|
||||
|
||||
variable "vpn_external_ip" {
|
||||
type = string
|
||||
nullable = true
|
||||
}
|
||||
|
||||
variable "peer_ip" {
|
||||
description = "IP address of the remote peer VPN gateway"
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "shared_secret" {
|
||||
description = "Shared secret for the VPN tunnel"
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "remote_selectors" {
|
||||
type = list(string)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user