You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I want to create a cluster where the default node pool has autoscaling enabled, I have to specify the node_pool, because the autoscaling sub is part of the node_pool schema. However, when autoscaling is enabled and min/max node count is set, it makes no sense to set node_count (with initial_node_count being deprecated), as that value changes when the cluster autoscales. Even though node_count is marked as optional, the expandNodePool function throws this error message: Node pool default-pool cannot be set with 0 node count if I don't set node_count.
I suggest that expandNodePool also checks if autoscaling is enabled, and don't complain about node_count == 0 if it is. Right now, I basically have to keep using initial_node_count, if I want this to work. Maybe have the code automatically set initial_node_count = 1 or something, when autoscaling is enabled.
Example HCL that will trigger this problem:
resource "google_container_cluster" "cluster" {
name = "cluster"
zone = "europe-west1-b"
node_pool {
name = "default-pool"
autoscaling {
min_node_count = 0
max_node_count = 5
}
}
}
The text was updated successfully, but these errors were encountered:
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!
ghost
locked and limited conversation to collaborators
Mar 30, 2020
Terraform Version
Affected Resource(s)
If I want to create a cluster where the default node pool has autoscaling enabled, I have to specify the
node_pool
, because theautoscaling
sub is part of thenode_pool
schema. However, when autoscaling is enabled and min/max node count is set, it makes no sense to setnode_count
(withinitial_node_count
being deprecated), as that value changes when the cluster autoscales. Even thoughnode_count
is marked as optional, theexpandNodePool
function throws this error message:Node pool default-pool cannot be set with 0 node count
if I don't setnode_count
.I suggest that
expandNodePool
also checks if autoscaling is enabled, and don't complain aboutnode_count == 0
if it is. Right now, I basically have to keep usinginitial_node_count
, if I want this to work. Maybe have the code automatically setinitial_node_count = 1
or something, when autoscaling is enabled.Example HCL that will trigger this problem:
The text was updated successfully, but these errors were encountered: