Skip to content

Commit c5d0d16

Browse files
committed
update infra
1 parent 9d5af5b commit c5d0d16

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

scaletest/terraform/infra/gcp_cluster.tf

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ resource "google_container_node_pool" "coder" {
4848
location = var.zone
4949
project = var.project_id
5050
cluster = google_container_cluster.primary.name
51-
node_count = var.state == "stopped" ? 0 : var.nodepool_size_coder
51+
autoscaling {
52+
min_node_count = 1
53+
max_node_count = var.nodepool_size_coder
54+
}
5255
management {
5356
auto_upgrade = false
5457
}
@@ -81,7 +84,10 @@ resource "google_container_node_pool" "workspaces" {
8184
location = var.zone
8285
project = var.project_id
8386
cluster = google_container_cluster.primary.name
84-
node_count = var.state == "stopped" ? 0 : var.nodepool_size_workspaces
87+
autoscaling {
88+
min_node_count = 0
89+
max_node_count = var.nodepool_size_workspaces
90+
}
8591
management {
8692
auto_upgrade = false
8793
}

0 commit comments

Comments
 (0)