For an existing Cluster that has been deployed using version 1.6 I would like to modify the worker counts.
When editing asg_desired_capacity it does not affect terraform plan and the ASG is not modified.
module "eks_dev" {
source = "terraform-aws-modules/eks/aws"
version = "1.6.0"
...
workers_group_defaults = {
key_name = "exploration-zone"
asg_desired_capacity = "4" # Desired worker capacity in the autoscaling group.
asg_max_size = "5" # Maximum worker capacity in the autoscaling group.
asg_min_size = "2" # Minimum worker capacity in the autoscaling group.
instance_type = "m4.large" # Size of the workers instances.
...
sry, no.
AWS region us-east-1
Also testes with 1.7 release. No impact.
.terraform was also removed and terraform init performed.
This is because desired_capacity is ignored due not wanting it to interfere with the cluster-autoscaler: https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/workers.tf#L22
So currently you would need to set this manually outside of Terraform.
Feel free to make a PR to make this setting optional 馃檪
Thank you for the quick and helpful response. I think the auto-scaler aspect is a fair point. I am fine if this is working as intended for the time being and will make use of the autoscaler once the environment has been bootstrapped.
OK cool, thanks for the update.
Would it make sense to exclude desired_capacity from the ignore lifecycle hook unless autoscaling_enabled is true for a given worker group?
Sure
lifecycle block does not support interpolations https://github.com/hashicorp/terraform/issues/3116
Most helpful comment
This is because
desired_capacityis ignored due not wanting it to interfere with the cluster-autoscaler: https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/workers.tf#L22So currently you would need to set this manually outside of Terraform.
Feel free to make a PR to make this setting optional 馃檪