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 force recreation on metadata and id #3272

Closed
BrendanThompson opened this issue Mar 18, 2019 · 2 comments
Closed
Assignees
Labels
bug forward/review In review; remove label to forward service/container

Comments

@BrendanThompson
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
  • If an issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to "hashibot", a community member has claimed the issue already.

Terraform Version

  • Terraform v0.11.13
  • provider.google v2.1.0

Affected Resource(s)

  • google_container_cluster
  • google_container_node_pool

Terraform Configuration Files

resource "google_container_node_pool" "primary_agent_pool" {
  name       = "primary-agentpool"
  region     = "${module.global_variables.region}"
  cluster    = "${google_container_cluster.primary.name}"
  node_count = 1

  node_config {
    preemptible  = false
    machine_type = "${var.node_machine_size}"

    oauth_scopes = [
      "https://www.googleapis.com/auth/compute",
      "https://www.googleapis.com/auth/devstorage.read_only",
      "https://www.googleapis.com/auth/logging.write",
      "https://www.googleapis.com/auth/monitoring",
    ]
  }

  autoscaling {
    min_node_count = 1
    max_node_count = 5
  }

  lifecycle {
    ignore_changes = [
      "id",
      "node_config.0.metadata"
    ]
  }
}

Expected Behavior

The terraform plan should result in no changes detected.

Actual Behavior

The below is what is produced by the terraform plan, as can be seen the id, node_config.0.metadata.%, node_config.0.metadata.disable-legacy-endpoints are forcing the recreation of the resource. The metadata objects were never declared, as can be seen above; and, the id shouldn't be new as far as I can tell.

-/+ google_container_node_pool.primary_agent_pool (new resource required)
      id:                                              "australia-southeast1/gke-aus-npd/primary-agentpool" => <computed> (forces new resource)
      autoscaling.#:                                   "1" => "1"
      autoscaling.0.max_node_count:                    "5" => "5"
      autoscaling.0.min_node_count:                    "1" => "1"
      cluster:                                         "gke-aus-npd" => "gke-aus-npd"
      initial_node_count:                              "1" => <computed>
      instance_group_urls.#:                           "3" => <computed>
      management.#:                                    "1" => <computed>
      max_pods_per_node:                               "" => <computed>
      name:                                            "primary-agentpool" => "primary-agentpool"
      name_prefix:                                     "" => <computed>
      node_config.#:                                   "1" => "1"
      node_config.0.disk_size_gb:                      "100" => <computed>
      node_config.0.disk_type:                         "pd-standard" => <computed>
      node_config.0.guest_accelerator.#:               "0" => <computed>
      node_config.0.image_type:                        "COS" => <computed>
      node_config.0.local_ssd_count:                   "0" => <computed>
      node_config.0.machine_type:                      "n1-standard-1" => "n1-standard-1"
      node_config.0.metadata.%:                        "1" => "0" (forces new resource)
      node_config.0.metadata.disable-legacy-endpoints: "true" => "" (forces new resource)
      node_config.0.oauth_scopes.#:                    "4" => "4"
      node_config.0.oauth_scopes.1277378754:           "https://www.googleapis.com/auth/monitoring" => "https://www.googleapis.com/auth/monitoring"
      node_config.0.oauth_scopes.1632638332:           "https://www.googleapis.com/auth/devstorage.read_only" => "https://www.googleapis.com/auth/devstorage.read_only"
      node_config.0.oauth_scopes.172152165:            "https://www.googleapis.com/auth/logging.write" => "https://www.googleapis.com/auth/logging.write"
      node_config.0.oauth_scopes.299962681:            "https://www.googleapis.com/auth/compute" => "https://www.googleapis.com/auth/compute"
      node_config.0.preemptible:                       "false" => "false"
      node_config.0.service_account:                   "default" => <computed>
      node_count:                                      "1" => "1"
      project:                                         "persuit-nonproduction" => <computed>
      region:                                          "australia-southeast1" => "australia-southeast1"
      version:                                         "1.12.5-gke.5" => <computed>
      zone:                                            "" => <computed>

Steps to Reproduce

  1. terraform plan
@ghost ghost added the bug label Mar 18, 2019
@rileykarson
Copy link
Collaborator

Resolved in the next release by #3233.

@rileykarson rileykarson self-assigned this Mar 18, 2019
@ghost
Copy link

ghost commented Apr 18, 2019

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 18, 2019
@github-actions github-actions bot added service/container forward/review In review; remove label to forward labels Jan 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug forward/review In review; remove label to forward service/container
Projects
None yet
Development

No branches or pull requests

2 participants