terraform-google-kubernetes-engine
terraform-google-kubernetes-engine copied to clipboard
Deprecation warning about `workload_identity_config. identity_namespace`
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
Thanks for the report. Happy to review a PR fixing this
https://github.com/hashicorp/terraform-provider-google/blob/5e7d3e8c52fa3bf6b0e4c4344cb7f205dd8dda1e/website/docs/guides/version_4_upgrade.html.markdown#workload_identity_config0identity_namespace-is-now-removed
Thanks for pointing to that doc, you got it: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/1052