-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Desired_capiacity is not updatable after init deployment #1568
Comments
meet exactly same problem 5 minutes ago, debugging it now but in sure it is not related to module itself. Looks like a bug in terraform AWS provider, I will post a update when I will find a root cause |
Ok, I know this is not updating desired instances number. This is because:
where we ignore desired size. Purpose of this is that we allow Cluster autoscaler to manage node groups. So if you want to influence a desired count you must modify this from WEB UI/AWS cli. To make this from terraform you must modify minimum size. I think we must update docs for this input |
Minimum size cannot be increased using Terraform 0.12 (I know, I know) with AWS provider v3.59.0:
|
This will update only minimum size. But the issue with changing the desired size still exists. |
Indeed. Changing min/max capacity also won't be possible if the previously set desired_capacity is for example lower than the new min_capacity. This is still an ugly issue and for now I can only fix it manually in AWS console and align the values in Terraform. |
We ran into this too, totally unexpected behavior. This Issue looks like a good solution for at least half the functionality. I would love to be able to intentionally >>increase<< my desired size through terraform as well though. is it possible to only ignore the change if the desired_size is lower than current size? that would prevent deleting nodes while allowing the intentional increase of size for time you know an influx of traffic is coming. |
unfortunately, no - once an attribute is ignored, Terraform completely disregards any changes to it. I haven't tried this myself, but for the situation you are describing - I would suggest just increasing the |
This doesn't work. We're still stuck not being able to use Terraform to adjust the cluster size. Here's an example scenario: You spin up an initial cluster with:
Now let's say you want to bump up the min size to 3 to add capacity to your cluster so you adjust your Terraform config to set the min to 3. When you apply it, you'll get an error saying the desired size can't be less than the minimum. Even if you change both the min and desired to 3 it doesn't matter because this EKS module ignores the desired change meaning from Terraform's POV the desired state is never going to be different than what it was when you first created your cluster (2 in this case which is < 3). In the end this leaves us with having to use the AWS web UI and not Terraform to adjust the size of the cluster. That or we don't use this EKS module for creating the worker nodes and instead use the raw https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_node_group resource where we can set the |
I'm having the same issue. |
Still an issue and extremely problematic for anyone using EKS module |
It is not extremely problematic, it is a design decision the module has taken. The majority of Kubernetes/EKS users utilize some form of autoscaling and without variable support for ignore_changes by Terraform core, thats what we currently have |
After deploying an EKS Cluster i updated the min and desired values. Terraform will fail saying that min_capacity cannot be more than desired. If i update just the desired_capacity value terraform shows no changes are needed.
What is the current behavior?
desired_capacity value is ignored after initial deployment and cannot be changed via terraform.
What's the expected behavior?
desired_capacity value is used
Any other relevant info
Terraform: 1.0.3
EKS Module: 17.1.0
Changing desired_capacity from 1 to 2 returns:
Updating min_capacity from 1 to 2 and desired_capacity from 1 to 2 errors:
Terraform plan:
The text was updated successfully, but these errors were encountered: