Created
August 8, 2020 08:35
-
-
Save shemul/e984d3e8ff19faa75a358aa7cf9ed574 to your computer and use it in GitHub Desktop.
Google Cloud Platform - kubernetes engine using terraform
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module "gke" { | |
source = "terraform-google-modules/kubernetes-engine/google" | |
project_id = "<PROJECT ID>" | |
name = "gke-test-1" | |
region = "us-central1" | |
zones = ["us-central1-a", "us-central1-b", "us-central1-f"] | |
network = "vpc-01" | |
subnetwork = "us-central1-01" | |
ip_range_pods = "us-central1-01-gke-01-pods" | |
ip_range_services = "us-central1-01-gke-01-services" | |
http_load_balancing = false | |
horizontal_pod_autoscaling = true | |
network_policy = true | |
node_pools = [ | |
{ | |
name = "default-node-pool" | |
machine_type = "e2-medium" | |
min_count = 1 | |
max_count = 100 | |
local_ssd_count = 0 | |
disk_size_gb = 100 | |
disk_type = "pd-standard" | |
image_type = "COS" | |
auto_repair = true | |
auto_upgrade = true | |
service_account = "project-service-account@<PROJECT ID>.iam.gserviceaccount.com" | |
preemptible = false | |
initial_node_count = 80 | |
}, | |
] | |
node_pools_oauth_scopes = { | |
all = [] | |
default-node-pool = [ | |
"https://www.googleapis.com/auth/cloud-platform", | |
] | |
} | |
node_pools_labels = { | |
all = {} | |
default-node-pool = { | |
default-node-pool = true | |
} | |
} | |
node_pools_metadata = { | |
all = {} | |
default-node-pool = { | |
node-pool-metadata-custom-value = "my-node-pool" | |
} | |
} | |
node_pools_tags = { | |
all = [] | |
default-node-pool = [ | |
"default-node-pool", | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment