Add GCP deployment examples: create Terraform configurations for GCP, including network setup, instance definitions, and routing, along with a README for usage instructions.

This commit is contained in:
2026-08-27 21:23:47 +02:00
parent 245d0dfd96
commit c8f54ca865
12 changed files with 465 additions and 2 deletions
+13
View File
@@ -0,0 +1,13 @@
locals {
remote_cidr_list = [for c in split(",", var.remote_cidrs) : trimspace(c) if trimspace(c) != ""]
}
resource "google_compute_route" "to_remote" {
for_each = toset(local.remote_cidr_list)
name = "${var.name}-to-${replace(replace(each.value, "/", "-"), ".", "-")}"
network = google_compute_network.internal.name
dest_range = each.value
next_hop_instance = google_compute_instance.router.self_link
priority = 100
}