diff --git a/modules/networking/main.tf b/modules/networking/main.tf index e0770dc..5652219 100644 --- a/modules/networking/main.tf +++ b/modules/networking/main.tf @@ -23,3 +23,15 @@ resource "google_service_networking_connection" "this" { service = "servicenetworking.googleapis.com" reserved_peering_ranges = [google_compute_global_address.this.name] } + +resource "google_compute_router" "this" { + name = "${var.namespace}-router" + network = google_compute_network.this.id +} + +resource "google_compute_router_nat" "this" { + name = "${var.namespace}-nat" + router = google_compute_router.this.name + nat_ip_allocate_option = "AUTO_ONLY" + source_subnetwork_ip_ranges_to_nat = "ALL_SUBNETWORKS_ALL_IP_RANGES" +} diff --git a/variables.tf b/variables.tf index ecd0bec..4df9ea0 100644 --- a/variables.tf +++ b/variables.tf @@ -59,7 +59,7 @@ variable "google_auth" { variable "chart_version" { type = string - default = "0.2.8" + default = "0.3.6" } variable "github_bot" {