Skip to content

Commit

Permalink
fix: node_metadata mapping for GCE_METADATA (#1542) (#1543)
Browse files Browse the repository at this point in the history
  • Loading branch information
fcrespel authored Feb 14, 2023
1 parent b69d7b7 commit b03ea84
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion autogen/main/main.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ locals {

{% if autopilot_cluster != true %}
// legacy mappings https://github.com/hashicorp/terraform-provider-google/pull/10238
old_node_metadata_config_mapping = { GKE_METADATA_SERVER = "GKE_METADATA", GCE_METADATA = "EXPOSE" }
old_node_metadata_config_mapping = { GKE_METADATA_SERVER = "GKE_METADATA", EXPOSE = "GCE_METADATA" }

cluster_node_metadata_config = var.node_metadata == "UNSPECIFIED" ? [] : [{
mode = lookup(local.old_node_metadata_config_mapping, var.node_metadata, var.node_metadata)
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ locals {
}]

// legacy mappings https://github.com/hashicorp/terraform-provider-google/pull/10238
old_node_metadata_config_mapping = { GKE_METADATA_SERVER = "GKE_METADATA", GCE_METADATA = "EXPOSE" }
old_node_metadata_config_mapping = { GKE_METADATA_SERVER = "GKE_METADATA", EXPOSE = "GCE_METADATA" }

cluster_node_metadata_config = var.node_metadata == "UNSPECIFIED" ? [] : [{
mode = lookup(local.old_node_metadata_config_mapping, var.node_metadata, var.node_metadata)
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster-update-variant/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ locals {
}]

// legacy mappings https://github.com/hashicorp/terraform-provider-google/pull/10238
old_node_metadata_config_mapping = { GKE_METADATA_SERVER = "GKE_METADATA", GCE_METADATA = "EXPOSE" }
old_node_metadata_config_mapping = { GKE_METADATA_SERVER = "GKE_METADATA", EXPOSE = "GCE_METADATA" }

cluster_node_metadata_config = var.node_metadata == "UNSPECIFIED" ? [] : [{
mode = lookup(local.old_node_metadata_config_mapping, var.node_metadata, var.node_metadata)
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ locals {
}]

// legacy mappings https://github.com/hashicorp/terraform-provider-google/pull/10238
old_node_metadata_config_mapping = { GKE_METADATA_SERVER = "GKE_METADATA", GCE_METADATA = "EXPOSE" }
old_node_metadata_config_mapping = { GKE_METADATA_SERVER = "GKE_METADATA", EXPOSE = "GCE_METADATA" }

cluster_node_metadata_config = var.node_metadata == "UNSPECIFIED" ? [] : [{
mode = lookup(local.old_node_metadata_config_mapping, var.node_metadata, var.node_metadata)
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster-update-variant/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ locals {
}]

// legacy mappings https://github.com/hashicorp/terraform-provider-google/pull/10238
old_node_metadata_config_mapping = { GKE_METADATA_SERVER = "GKE_METADATA", GCE_METADATA = "EXPOSE" }
old_node_metadata_config_mapping = { GKE_METADATA_SERVER = "GKE_METADATA", EXPOSE = "GCE_METADATA" }

cluster_node_metadata_config = var.node_metadata == "UNSPECIFIED" ? [] : [{
mode = lookup(local.old_node_metadata_config_mapping, var.node_metadata, var.node_metadata)
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ locals {
}]

// legacy mappings https://github.com/hashicorp/terraform-provider-google/pull/10238
old_node_metadata_config_mapping = { GKE_METADATA_SERVER = "GKE_METADATA", GCE_METADATA = "EXPOSE" }
old_node_metadata_config_mapping = { GKE_METADATA_SERVER = "GKE_METADATA", EXPOSE = "GCE_METADATA" }

cluster_node_metadata_config = var.node_metadata == "UNSPECIFIED" ? [] : [{
mode = lookup(local.old_node_metadata_config_mapping, var.node_metadata, var.node_metadata)
Expand Down
2 changes: 1 addition & 1 deletion modules/private-cluster-update-variant/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ locals {
}]

// legacy mappings https://github.com/hashicorp/terraform-provider-google/pull/10238
old_node_metadata_config_mapping = { GKE_METADATA_SERVER = "GKE_METADATA", GCE_METADATA = "EXPOSE" }
old_node_metadata_config_mapping = { GKE_METADATA_SERVER = "GKE_METADATA", EXPOSE = "GCE_METADATA" }

cluster_node_metadata_config = var.node_metadata == "UNSPECIFIED" ? [] : [{
mode = lookup(local.old_node_metadata_config_mapping, var.node_metadata, var.node_metadata)
Expand Down
2 changes: 1 addition & 1 deletion modules/private-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ locals {
}]

// legacy mappings https://github.com/hashicorp/terraform-provider-google/pull/10238
old_node_metadata_config_mapping = { GKE_METADATA_SERVER = "GKE_METADATA", GCE_METADATA = "EXPOSE" }
old_node_metadata_config_mapping = { GKE_METADATA_SERVER = "GKE_METADATA", EXPOSE = "GCE_METADATA" }

cluster_node_metadata_config = var.node_metadata == "UNSPECIFIED" ? [] : [{
mode = lookup(local.old_node_metadata_config_mapping, var.node_metadata, var.node_metadata)
Expand Down

0 comments on commit b03ea84

Please sign in to comment.