diff --git a/main.tf b/main.tf index 5922177..aa79f1d 100644 --- a/main.tf +++ b/main.tf @@ -8,7 +8,7 @@ terraform { } locals { - hub_region = substr(var.hub.zone, 0, length(var.hub.zone) - 2) + hub_region = substr(var.hub.zone, 0, length(var.hub.zone) - 2) spoke_region = substr(var.spoke.zone, 0, length(var.spoke.zone) - 2) } @@ -92,7 +92,16 @@ module "to_lazurowa" { local_selectors = [var.hub.cidr, var.spoke.cidr] remote_selectors = var.remote_selectors - depends_on = [module.gw] +module "vm_gw" { + source = "./modules/linux-vm" + + name = "vm-${var.hub.name}-gw" + network_name = "${var.hub.name}-vpc" + subnet_name = "${var.hub.name}-network" + ssh = var.ssh + can_ip_forward = true + + depends_on = [module.hub_network] } module "vm_hub" {