Added VPN GW and Tunnel modules.

This commit is contained in:
2025-03-31 15:56:06 +02:00
parent 5b0c5d33eb
commit c878380f33
7 changed files with 179 additions and 0 deletions
+28
View File
@@ -65,6 +65,34 @@ module "hub_to_spoke_peering" {
]
}
module "gw" {
source = "./modules/cloud-vpn"
name = "${var.hub.name}-vpn"
network_name = module.hub_network.name
region = var.hub.region
vpn_external_ip = "vpw-gw-us-west1"
}
module "to_lazurowa" {
source = "./modules/cloud-vpn-tunnel"
name = "${var.hub.name}-to-lazurowa"
gw_name = module.gw.name
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"
]
depends_on = [module.gw]
}
module "vm_hub" {
source = "./modules/linux-vm"