Open talonx opened 1 year ago
I think that this might get turned off by setting certain settings- the Console may display it differently than the API representation
@talonx @rileykarson I would like to pick this issue up . I will add the PR.
I've just tested this and at least the removal of the whole autoscaler block disables autoscaling:
dynamic "autoscaling" {
for_each = lookup(each.value, "autoscaling", true) ? [each.value] : []
content {
min_node_count = lookup(autoscaling.value, "min_count", 1)
# The following number will retermine the maxumum number of nodes per location = zone, which
# means we'll have 3x this much nodes in the pool distributed ~ evenly between the 3 zones
# https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#nodepoolautoscaling
max_node_count = lookup(autoscaling.value, "max_count", 10)
}
}
Community Note
Description
The google_container_node_pool resource does not support turning off the cluster autoscaler. It has an
autoscaling
configuration block which just has options to set the max and min nodes, but not turn it off entirely.This feature is available in the GKE console, which means it must be part of the GKE API also.
New or Affected Resource(s)
Potential Terraform Configuration
NA
References
0000
b/299601056