-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Terraform can't handle GKE issue_client_certificate w/ K8S version 1.12 #3369
Terraform can't handle GKE issue_client_certificate w/ K8S version 1.12 #3369
Comments
I am having exactly the same issue, i believe it is related with the following:
|
Important detail seems to be that this only happens to recently created Our preexisting |
I've tried to switch to latest, because of this: Azure/AKS#273 |
This could well be related to #2183 |
@joaosousafranco: Those lines have been present for 10 months, so I don't think it's them. GKE's administration API (eg the GCP API the Google provider uses, and not the Kubernetes API) has different behaviour when different Kubernetes versions are used at creation time. This is technically not a breaking change on their end, but super frustrating for API consumers like Terraform where we aren't enable to encode the rules of a whole other control plane's versioning system well. K8S version |
@rileykarson these lines: -/+ module.gke.google_container_cluster.dev (new resource required)
id: "dev" => <computed> (forces new resource)
...
master_auth.#: "1" => "1"
master_auth.0.client_certificate: "" => <computed>
master_auth.0.client_certificate_config.#: "1" => "0" (forces new resource)
master_auth.0.client_key: <sensitive> => <computed> (attribute changed)
... and these: ~ module.gke.google_container_cluster.dev
network: "projects/<project>/global/networks/default" => "default" |
Is there a workaround, besides
|
There are two workarounds for the issue where Terraform is causing a recreate. The recreate is a problem with how the provider a diff on lifecycle {
ignore_changes = ["master_auth"]
} As well, if you've specified a master_auth {
client_certificate_config {
issue_client_certificate = false
}
} Finally, if you use a To provide more context on why this + #3240 are happening, as stated before, GKE published K8S This is a case that Terraform providers aren't great at handling. Provider schema typing is defined in code, and we need to make a code change + new provider release to solve this. A solution to one of this or #3240 needs to solve the other at the same time, or we're just going to have to make more similar changes possibly breaking users again so I'm consolidating both issues here. When implementing this feature initially, because of how Terraform's diff engine behaves, we had to add shims at various levels to make this value appear correct for users at plan time. That included how we interpreted null values in the API. The change in defaults means that the meaning of the null value has changed, and that's caused #3240- the provider is currently only able to send requests with a null value (previously an implicit enablement of client certs) or an explicit disablement. In addition, the provider considers enabled values ( We'll attempt to massage Terraform so that clusters with either pre- or post- |
This fix will be released in |
It would be better to not close issues before they are released.. |
2.8.0 does not seem to resolve the problem. Still getting the error |
@james-knott can you file a new issue including a config and debug logs? |
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! |
Community Note
Terraform Version
Affected Resource(s)
google_container_cluster
Terraform Configuration Files
Debug Output
https://gist.github.com/orkenstein/f68f6a437d2e5057e5d798508f851c66
Panic Output
Nope
Expected Behavior
Cluster should not be changed
Actual Behavior
Steps to Reproduce
Important Factoids
References
The text was updated successfully, but these errors were encountered: