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

Deprecation warning for workload_metadata_config parameter #1024

Closed
wyardley opened this issue Oct 11, 2021 · 14 comments
Closed

Deprecation warning for workload_metadata_config parameter #1024

wyardley opened this issue Oct 11, 2021 · 14 comments
Labels
bug Something isn't working P1 highest priority issues triaged Scoped and ready for work

Comments

@wyardley
Copy link
Contributor

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:

node_metadata = workload_metadata_config.value.node_metadata

Either way, I can “apply” the drift, but it shows up on the next plan / apply. Is there a way to avoid this?

@morgante
Copy link
Contributor

Permadiffs should be addressed at the provider. Please open a bug here: https://github.com/hashicorp/terraform-provider-google/issues

@wyardley
Copy link
Contributor Author

@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)?

@wyardley
Copy link
Contributor Author

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.

@morgante
Copy link
Contributor

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.

@wyardley
Copy link
Contributor Author

My guess is the API behavior changed.

Oh, derp. yeah, I've seen that happen before
Filed hashicorp/terraform-provider-google#10300
with some debug output that may help them figure it out

@wyardley wyardley changed the title workload_metadata_config mode permadrift Deprecation warning for workload_metadata_config parameter Oct 12, 2021
@alexku7
Copy link

alexku7 commented Oct 12, 2021

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

@onimsha
Copy link

onimsha commented Oct 13, 2021

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"
    }
  }
}

@morgante morgante added bug Something isn't working P1 highest priority issues triaged Scoped and ready for work labels Oct 13, 2021
@brandondtb
Copy link

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.

@wyardley
Copy link
Contributor Author

Hrm. I tried pinning one version back and didn’t have any luck, but will try it again.

@FearlessHyena
Copy link

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

@JCPistell
Copy link

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: #1042

@JCPistell
Copy link

The issue has been fixed in 3.90.1: hashicorp/terraform-provider-google#10479

@mike-serchenia
Copy link

using 3.90.1
gets another error: terraform-google-kubernetes-engine/issues/1045

@FalconerTC
Copy link

This is broken again in 4.0+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1 highest priority issues triaged Scoped and ready for work
Projects
None yet
Development

No branches or pull requests

9 participants