Skip to content
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

google_container_node_pool: modifying taints forces replacement #16054

Closed
xinau opened this issue Sep 29, 2023 · 3 comments · Fixed by GoogleCloudPlatform/magic-modules#12014, #20038 or hashicorp/terraform-provider-google-beta#8522

Comments

@xinau
Copy link

xinau commented Sep 29, 2023

Terraform Version

$ terraform version
Terraform v1.5.3
on linux_amd64
...
+ provider registry.terraform.io/hashicorp/google v4.75.0
+ provider registry.terraform.io/hashicorp/google-beta v4.75.0
...

Your version of Terraform is out of date! The latest version
is 1.5.7. You can update by downloading from https://www.terraform.io/downloads.html

Affected Resource(s)

  • google_container_node_pool

Terraform Configuration Files

  resource "google_container_node_pool" "default" {
    name       = "default"
    cluster    = google_container_cluster.default.id
    node_count = 1

    node_config {
      machine_type = "n1-standard"
      service_account = google_service_account.default.email
      oauth_scopes = [
        "https://www.googleapis.com/auth/cloud-platform"
      ]
      taint = [{
        key = "example.com/taint-1"
        effect = "NO_SCHEDULE" cause
        value = "true"
+     }, {
+       key = "example.com/taint-2"
+       effect = "NO_SCHEDULE"
+       value = "true"
      }]
    }
}

Expected Behavior

I've expected that the provider to behave the same way as the Google Cloud console when a new taint is added in that it does an in-place update.

Actual Behavior

The actual behavior is that a chance to a node pools taints forces a replacement of the node-pool. Having the ability to do an in-place update as provided by the Google Cloud console is critical when managing multiple clusters with multiple node pools and thousands of nodes as a replace or blue-green approach is mostly infeasible.

Steps to Reproduce

  1. Create a GKE node pool using Terraform with a single taint like example.com/taint-1=true:NoSchedule
  2. Modify the GKE node pool using Terraform by adding a new taint like example.com/taint-2=true:NoSchedule
  3. Watch Terraform force replace the modified node pool.

b/302797527

@xinau xinau added the bug label Sep 29, 2023
@github-actions github-actions bot added forward/review In review; remove label to forward service/container labels Sep 29, 2023
@edwardmedia edwardmedia removed the forward/review In review; remove label to forward label Sep 29, 2023
@philip-harvey
Copy link

duplicate of #13872?

@xinau
Copy link
Author

xinau commented Oct 5, 2023

@philip-harvey thanks for the catch. I've seemed to missed this one. Yes this is a duplicate.

Copy link

I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.