hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.29k stars 1.72k forks source link

GKE node_pool taints should not force resource recreation #13872

Open gorge511 opened 1 year ago

gorge511 commented 1 year ago

Community Note

Terraform Version

Terraform v1.3.7
on darwin_amd64

Google Terraform Provider 4.55.0

Affected Resource(s)

Expected Behavior

Node pool should be modified in place. This change works in the GCP Console WebUI. So there should be possibility to update taints without node pool recreation.

Also this works with gcloud. See the docs for update command.

Actual Behavior

When you change the taint in node_config block on the node pool the resource is forced to be recreated.

There is a limitation written in the docs, but I think this is no longer relevant for non-default node pools.

See the forcing code in google provider. And see the gcloud command docs where you can see that --node-taints is available in update operation.

Steps to Reproduce

  1. Create GKE cluster with non-default node pool with google_container_node_pool without taint in the node_config block.
  2. Add any taint in the node_config block.
  3. Plan now shows node pool recreation.

References

rileykarson commented 1 year ago

Note: We've had a lot of issues with GKE taints over time- we really need to rethink our model for them. See https://github.com/hashicorp/terraform-provider-google/issues/7928 for a related issue.

ondrejhlavacek commented 10 months ago

Can be closed, it's fixed, see https://github.com/hashicorp/terraform-provider-google/issues/7928 for details.