Skip to main content
Knowledge Base

modules/eks-cluster - desired_size value not being picked up by EKS

Answer

A customer asked: > Hi all - we are noticed that when using the modules/eks-cluster, the desired_size value is not getting picked up by EKS ``` example: node_group_default_desired_size = ${value0} managed_node_groups_configurations = { ngroup1 = { desired_size = ${value1} ... ... } ... } ``` as shown here: https://github.com/gruntwork-io/terraform-aws-service-catalog/blob/master/modules/services/eks-cluster/variables.tf#L693-L709 **UNLESS**: its the FIRST time running `tg apply` (initial creation of cluster) with `node_group_default_desired_size` set withOUT `desired_size` set in `group_config(s)` the name(s) of the `node_group(s)` have changed WITH `desired_size` set in `group_config(s)` under a new name Is this expected behavior?

Yes this is expected. The desired size attribute is setup in this manner so that it can avoid inadvertent terraform drift when using with the cluster autoscale. If you are going for a manual scaling system and not using the cluster autoscaler, the recommendation is to set the `min_size` and `max_size` to the same value and scale that way.