Skip to content

Instantly share code, notes, and snippets.

@Simonx123
Forked from Callonski/network.tf
Created September 7, 2020 00:58
Show Gist options
  • Save Simonx123/123be81a6a65d14b50641c1f353233dc to your computer and use it in GitHub Desktop.
Save Simonx123/123be81a6a65d14b50641c1f353233dc to your computer and use it in GitHub Desktop.
resource "google_compute_network" "my-elastic-network" {
name = "${var.project_name}-elastic-vpc"
auto_create_subnetworks = false
}
resource "google_compute_subnetwork" "my-elastic-subnet" {
name = "my-elastic-subnet"
ip_cidr_range = "select a range in your region"
network = google_compute_network.my-elastic-network.self_link
region = var.region
private_ip_google_access = true
log_config {
aggregation_interval = "INTERVAL_10_MIN"
flow_sampling = 0.5
metadata = "INCLUDE_ALL_METADATA"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment