-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
fix: Supports setting cluster_compute_config = null
or cluster_compute_config.enabled = false
#3308
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
fix: Supports setting cluster_compute_config = null
or cluster_compute_config.enabled = false
#3308
Conversation
The logic around enabling Auto Mode is based on the value never being null, so use `nullable = false` in the variable definition so that a null value will be interpreted as nn empty map (the default value). Fixes terraform-aws-modules#3307
The API will return an error if compute_config.enabled is set to false, when every other required option for auto mode is also not provided. ``` │ Error: creating EKS Cluster (test-minimum-inputs-kuneic): operation error EKS: CreateCluster, https response error StatusCode: 400, RequestID: 573c664d-68c6-463c-b117-ba12722ebe96, InvalidParameterException: For EKS Auto Mode, please ensure that all required configs, including computeConfig, kubernetesNetworkConfig, and blockStorage are all either fully enabled or fully disabled. ``` Seems like an odd API choice, but that's how it works. Fixes terraform-aws-modules#3307
This doesn't solve it, has to be fixed upstream first #3273 |
The issue you linked to is about an existing cluster. These errors occur in a brand new cluster. Please reopen and reconsider a little further. |
Alright, @bryantbiggs, I've figured out the issue with disabling Auto Mode. It's not really an upstream issue, as much as a difficult API. But this module can support enabling and disabling Auto Mode, with some limitations. I'm pushing the fix to this branch, the commit has the full explanation. If you'll please reopen and review, it would be much appreciated! |
we are not making any further changes to enable/disable of Auto Mode until hashicorp/terraform-provider-aws#41155 lands upstream |
I don't think that upstream patch is actually a solution to the issue. It can't fix the CreateCluster API, and that is what is imposing the limitations. It's not a provider issue. |
Well I guess the PR doesn't update once closed, but the branch has the fix. You can review the changeset here, instead, master...lorengordon:terraform-aws-eks:fix/compute-config-false-or-null I'll leave the branch, so It'll be waiting for you whenever you get around to reviewing. |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
Couple logic issues around
cluster_compute_config
that this is addressing:null
, otherwise thelength()
function fails, so we usenullable = false
in the variable definition so that a null value will be interpreted as an empty map (the default value).compute_config.enabled
is set tofalse
, when every other required option for auto mode is also not provided. So we just condition the block onlocal.auto_mode_enabled
so the entire block is absent.Motivation and Context
Fixes #3307
Fixes #3273
Breaking Changes
None
How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)examples/*
projectspre-commit run -a
on my pull request