From 965711695071fcfc3bda63d4c66c43b4add7afee Mon Sep 17 00:00:00 2001 From: Cameron Gray <868953+camerondgray@users.noreply.github.com> Date: Wed, 4 Dec 2019 18:41:38 -0800 Subject: [PATCH] gcp: cluster autoscaling (#39) * enable autoscaling on GCP by default * formatting --- terraform/cluster/gcp/main.tf | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/terraform/cluster/gcp/main.tf b/terraform/cluster/gcp/main.tf index 0de027d..f9ec806 100644 --- a/terraform/cluster/gcp/main.tf +++ b/terraform/cluster/gcp/main.tf @@ -63,10 +63,15 @@ resource "google_container_cluster" "rack" { resource "google_container_node_pool" "rack" { provider = "google-beta" - name = "${google_container_cluster.rack.name}-nodes-${var.node_type}" - location = google_container_cluster.rack.location - cluster = google_container_cluster.rack.name - node_count = 1 + name = "${google_container_cluster.rack.name}-nodes-${var.node_type}" + location = google_container_cluster.rack.location + cluster = google_container_cluster.rack.name + initial_node_count = 1 + + autoscaling { + min_node_count = 1 + max_node_count = 1000 + } node_config { preemptible = true