- Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed as not planned
Labels
Description
TL;DR
The node_metadata variable cannot be set to GCE_METADATA or EXPOSE (legacy value) anymore due to a mistake in the backward compatibility mapping introduced in #1129:
| old_node_metadata_config_mapping = { GKE_METADATA_SERVER = "GKE_METADATA", GCE_METADATA = "EXPOSE" } |
The legacy EXPOSE value should be mapped to the new GCE_METADATA value, but here it's the opposite: the GCE_METADATA value is mapped to EXPOSE, which is no longer valid.
Expected behavior
Plan should apply with node_metadata set to GCE_METADATA or EXPOSE (legacy value).
Observed behavior
Plan fails with the following error in both cases:
expected node_pool.0.node_config.0.workload_metadata_config.0.mode to be one of [MODE_UNSPECIFIED GCE_METADATA GKE_METADATA], got EXPOSE Terraform Configuration
module "gke" { source = "terraform-google-modules/kubernetes-engine/google" project_id = var.project_id name = var.cluster_name region = var.region network = var.network subnetwork = var.subnetwork ip_range_pods = var.ip_range_pods ip_range_services = var.ip_range_services kubernetes_version = "1.23" node_metadata = "GCE_METADATA" # This does not work remove_default_node_pool = true node_pools = [ { name = "node-pool-01" min_count = 1 max_count = 3 auto_upgrade = true } ] }Terraform Version
Terraform v1.3.7 on windows_amd64Additional information
No response