terraform-google-kubernetes-engine
terraform-google-kubernetes-engine copied to clipboard
Deprecation warning for workload_metadata_config parameter
I'm getting the following as permadrift with https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/tree/master/modules/beta-private-cluster and Google provider v3.88.0:
~ resource "google_container_node_pool" "pools" {
[…]
~ node_config {
[…]
~ workload_metadata_config {
- mode = "GKE_METADATA" -> null
If I explicitly set node_metadata = "GKE_METADATA_SERVER", I get a deprecation warning about node_metadata being deprecated for mode, presumably from:
https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/blob/660ddc9afc9ed8a308d9388a08eff3c36af551a0/modules/beta-private-cluster/cluster.tf#L234
Either way, I can “apply” the drift, but it shows up on the next plan / apply. Is there a way to avoid this?
Permadiffs should be addressed at the provider. Please open a bug here: https://github.com/hashicorp/terraform-provider-google/issues
@morgante won't the deprecation warning
│ Warning: Deprecated Attribute
│
│ with module.gke.google_container_cluster.primary,
│ on .terraform/modules/gke/modules/beta-private-cluster/cluster.tf line 227, in resource "google_container_cluster" "primary":
│ 227: node_config {
│
│ Deprecated in favor of mode.
be an issue in either case (esp. if the module is supporting both old and new versions of the provider)?
Also wondering if I may be missing a setting needed for this to not register?
Oddly, a plan with the same provider version didn't seem to exhibit this issue a couple of hours ago when I updated to the latest provider versions 🤔
I did try pinning a version or two back of this module (as well as the provider), and neither seemed to fix it.
Oh sorry, I missed the deprecation warning. Yes we should fix that.
Oddly, a plan with the same provider version didn't seem to exhibit this issue a couple of hours ago when I updated to the latest provider versions 🤔
My guess is the API behavior changed.
My guess is the API behavior changed.
Oh, derp. yeah, I've seen that happen before Filed https://github.com/hashicorp/terraform-provider-google/issues/10300 with some debug output that may help them figure it out
I forked the module localy and changed the deprecated node_metadata to node and to the value GKE_METADATA instead of the previous GKE_METADATA_SERVER and seems the error has gone
For anyone is interested, i had to pin the exact provider version in my terraform configuration like this to not having the plan drift
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "3.78"
}
google-beta = {
source = "hashicorp/google-beta"
version = "3.82"
}
kubernetes = {
source = "hashicorp/kubernetes"
version = "1.13.4"
}
}
}
FYI, regarding version pinning, I only needed to pin the google provider to the version prior to the latest, 3.87.0 in order to avoid these updates.
Hrm. I tried pinning one version back and didn’t have any luck, but will try it again.
3.87.0 worked for me too Also seems like hashicorp/terraform-provider-google#10300 submitted by @wyardley has been fixed so hopefully the next provider release will include the fix
FYI, upgrading to 3.90.0 does indeed seem to resolve this issue, but now I'm getting a deprecation warning for basic auth. Reported here: terraform-google-modules/terraform-google-kubernetes-engine#1042
The issue has been fixed in 3.90.1: https://github.com/hashicorp/terraform-provider-google/pull/10479
using 3.90.1 gets another error: terraform-google-kubernetes-engine/issues/1045
This is broken again in 4.0+