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

Document workaround for #3369 in recommended usage examples for google_container_cluster #3672

Closed
ejschoen opened this issue May 21, 2019 · 2 comments · Fixed by GoogleCloudPlatform/magic-modules#1844
Assignees

Comments

@ejschoen
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 the 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 the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.

Description

I've spent a week trying to stop my system from trying to recreate its cluster on unrelated changes, or after timeout failures while provisioning the system. This involved trying many different examples from published tutorials on the web, as well as searching through issues on this Github and looking for relevant questions on stackoverflow. I reduced the problem to its simplest form, by trying to manage a cluster using exactly the recommended usage for google_container_cluster.

Eventually, I stumbled across #3369, which was the root cause of my problem.

The problem is that Terraform behavior is described by authors using many different terms: idempotent, change, recreate, etc. It's very hard to find all relevant mentions of Terraform recreating a resource (like a cluster) by Google searching.

Until provider 3.0.0 can be released with fixes to the lifecycle issues, it might make sense to document the workarounds mentioned in that issue in the recommended usage documentation.

New or Affected Resource(s)

  • google_container_cluster

Potential Terraform Configuration

resource "google_container_cluster" "primary" {
  name     = "my-gke-cluster"
  location = "us-central1-f"

  # We can't create a cluster with no node pool defined, but we want to only use
  # separately managed node pools. So we create the smallest possible default
  # node pool and immediately delete it.
  remove_default_node_pool = true
  initial_node_count = 1

  # Setting an empty username and password explicitly disables basic auth
  master_auth {
    username = ""
    password = ""
  }
  # Workaround for issue 3369.
  lifecycle {
    ignore_changes = ["master_auth", "network"]
  }
}

References

@danawillow
Copy link
Contributor

@rileykarson, passing this to you since you have the most context on the issue

@ghost
Copy link

ghost commented Jun 29, 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 Jun 29, 2019
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.

3 participants