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:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user