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

crash adding new google_container_node_pool to google_container_cluster #479

Closed
james-masson opened this issue Sep 28, 2017 · 4 comments · Fixed by #531
Closed

crash adding new google_container_node_pool to google_container_cluster #479

james-masson opened this issue Sep 28, 2017 · 4 comments · Fixed by #531
Assignees

Comments

@james-masson
Copy link

Terraform Version

Terraform v0.10.6

Terraform Configuration Files

Problems start when I add a new nodepool to an existing GKE cluster
I can provide the full module if you need it - but crash only occurred when I added the code below.

resource "google_container_node_pool" "k8s" {
  count               = "${var.expansion_nodepools}"
  name_prefix         = "${var.cluster_name}-np${var.expansion_nodepools}-"
  zone                = "${var.region}-${element( split(",", lookup(var.zones_lookup, var.region)), 0 )}"
  cluster             = "${google_container_cluster.k8s.name}"
  initial_node_count  = "${var.expansion_nodes_per_zone}"

  node_config {

    machine_type = "${var.expansion_machine_type}"

    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",
      "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
    ]
  }
}

Crash Output

https://gist.github.com/james-masson/b38f69906412c34f50b55f10a1c320f3

Expected Behavior

Terraform applies configuration, and does not crash.

Actual Behavior

Terraform crashes - but resource is successfully created in GCE. Resource not recorded in tfstate, because of the crash.

@james-masson
Copy link
Author

I've moved the offending code into a separate module - crash still occurs, resource is still created successfully.

It seems directly related to adding a nodepool to an existing cluster.

* google_container_node_pool.k8s: unexpected EOF

@tazjin
Copy link

tazjin commented Oct 4, 2017

I've seen this before, didn't spend too much time debugging but not using name_prefix and instead setting a fixed name helped.

@danawillow
Copy link
Contributor

Yup, I'm working on a fix now but @tazjin is right- it'll work just fine if you use name for now.

luis-silva pushed a commit to luis-silva/terraform-provider-google that referenced this issue May 21, 2019
@ghost
Copy link

ghost commented Mar 30, 2020

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 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants