Skip to content

Instantly share code, notes, and snippets.

@tylrd
Created March 2, 2018 15:57
Show Gist options
  • Save tylrd/4cefe0a44dea6bbf77f324e5b9bcfeba to your computer and use it in GitHub Desktop.
Save tylrd/4cefe0a44dea6bbf77f324e5b9bcfeba to your computer and use it in GitHub Desktop.
resource "google_compute_subnetwork" "subnet" {
count = "${length(var.subnetworks)}"
network = "${google_compute_network.default.self_link}"
ip_cidr_range = "${element(values(var.subnetworks), count.index)}"
name = "${var.env}-gcp-${var.region}-${element(keys(var.subnetworks), count.index)}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment