-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
sysctl change does not actually get applied #18208
Comments
As I understand your issue is that after creating the resource
And the unique step to reproduce this issue is to run a Finally please send us the complete LOG.DEBUG output and the terraform.tfstate result after the resource creation to confirm what is happening in your environment. |
Yes, that is correct. |
I added a Github gist with files that show the output of terraform apply with debug logging turned on, together with the Terraform state. https://gist.github.com/christhegrand/8e1bf8de6e842298a762ca71c4ae1462 |
Possible bug in update, it looks like |
Instead of using
You can try with
I tried apply these setting with terraform and it works. |
Adde some reference for this. In https://registry.terraform.io/providers/hashicorp/google/5.32.0/docs/resources/container_cluster#argument-reference Recommended to create with a separately managed node pool (recommended) |
Thanks. We are trying to add node config defaults to autoprovisioned node pools. Is it not possible to do that using Terraform? |
Maybe you can try first enable node auto-provisioning on the cluster with Terraform , then specify which node pools are auto-provisioned: |
As mentioned in terraform-google-modules/terraform-google-kubernetes-engine#15 the default nodepool causes trouble with managing the cluster. Personally I always delete the default nodepool and create additional nodepools and manage their lifecycle outside the lifecycle of the cluster resource. @christhegrand can you update your cluster provisioning script to create additional nodepool resources and delete the default nodepool? |
I did delete the default node pool:
That's interesting. I didn't realize I could create a node pool and then enable auto-provisioning on it. |
@christhegrand Are you able to make changes to the additional node pools (not using the cluster level node_config field)? |
@christhegrand I have created a bug internally for GKE to deprecate the cluster level field |
Sure. Thank you! |
Community Note
Terraform Version & Provider Version(s)
Terraform v1.8.2
on darwin_arm64
Your version of Terraform is out of date! The latest version
is 1.8.3. You can update by downloading from https://www.terraform.io/downloads.html
Affected Resource(s)
google_container_cluster
Terraform Configuration
Debug Output
Expected Behavior
When I run terraform apply with this change, Terraform reports that the change has been applied successfully. When I run terraform apply again, I should see that there are no more changes to apply.
Actual Behavior
When I run terraform apply with this change, Terraform reports that the change has been applied successfully. But when I run terraform apply again, I see the sysctl change show up as an unapplied change. Basically, Terraform thinks the change has been applied successfully, but it does not seem like it is actually persisting.
Steps to reproduce
terraform apply
Important Factoids
No response
References
No response
b/342657392
b/343052499
The text was updated successfully, but these errors were encountered: