Skip to content

Deprecation warning about workload_identity_config. identity_namespace #1051

Open
@lra

Description

@lra

When planning and applying, we get the following warning:

╷
│ Warning: Deprecated Attribute
│ 
│   with module.stack.module.gke.module.gke.google_container_cluster.primary,
│   on .terraform/modules/stack.gke.gke/modules/private-cluster/cluster.tf line 22, in resource "google_container_cluster" "primary":
│   22: resource "google_container_cluster" "primary" {
│ 
│ This field will be removed in a future major release as it has been deprecated in the API. Use `workload_pool` instead.
│ 
│ (and 4 more similar warnings elsewhere)
╵

I think this is about the following block in the google_container_cluster.primary resource in modules/private-cluster/cluster.tf:

  dynamic "workload_identity_config" {
    for_each = local.cluster_workload_identity_config

    content {
      identity_namespace = workload_identity_config.value.identity_namespace
    }
  }

Per the doc, this should use workload_pool instead.

Versions used:

module "gke" {
  source  = "terraform-google-modules/kubernetes-engine/google//modules/private-cluster"
  version = "~> 17.1.0"
Terraform v1.0.10
on darwin_amd64
+ provider registry.terraform.io/hashicorp/aws v3.63.0
+ provider registry.terraform.io/hashicorp/azurerm v2.83.0
+ provider registry.terraform.io/hashicorp/external v2.1.0
+ provider registry.terraform.io/hashicorp/google v3.90.1
+ provider registry.terraform.io/hashicorp/google-beta v3.90.1
+ provider registry.terraform.io/hashicorp/kubernetes v2.6.1
+ provider registry.terraform.io/hashicorp/null v3.1.0
+ provider registry.terraform.io/hashicorp/random v3.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2high priority issuesrefactorUpdates for readability, code cleanliness, DRYness, etc. Only needs Terraform exp.triagedScoped and ready for work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions