Skip to content

Commit

Permalink
Fix misspellings in comments and min_cpu_platform
Browse files Browse the repository at this point in the history
Fix misspellings in comments and inconsistent lookup
in node_config.min_cpu_platform.
  • Loading branch information
sasha-s committed Apr 8, 2022
1 parent 5197f22 commit 9f0f57d
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ resource "google_container_node_pool" "pools" {
node_config {
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")
machine_type = lookup(each.value, "machine_type", "e2-medium")
min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
min_cpu_platform = lookup(each.value, "min_cpu_platform", "")
labels = merge(
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},
Expand Down
4 changes: 2 additions & 2 deletions autogen/safer-cluster/main.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ module "gke" {

initial_node_count = var.initial_node_count

// We suggest removing the default node pull, as it cannot be modified without
// We suggest removing the default node pool, as it cannot be modified without
// destroying the cluster.
remove_default_node_pool = true

Expand All @@ -103,7 +103,7 @@ module "gke" {

// We either:
// - Create a dedicated service account with minimal permissions to run nodes.
// All applications shuold run with an identity defined via Workload Identity anyway.
// All applications should run with an identity defined via Workload Identity anyway.
// - Use a service account passed as a parameter to the module, in case the user
// wants to maintain control of their service accounts.
create_service_account = var.compute_engine_service_account == "" ? true : false
Expand Down
2 changes: 1 addition & 1 deletion cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ resource "google_container_node_pool" "pools" {
node_config {
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")
machine_type = lookup(each.value, "machine_type", "e2-medium")
min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
min_cpu_platform = lookup(each.value, "min_cpu_platform", "")
labels = merge(
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ resource "google_container_node_pool" "pools" {
node_config {
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")
machine_type = lookup(each.value, "machine_type", "e2-medium")
min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
min_cpu_platform = lookup(each.value, "min_cpu_platform", "")
labels = merge(
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ resource "google_container_node_pool" "pools" {
node_config {
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")
machine_type = lookup(each.value, "machine_type", "e2-medium")
min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
min_cpu_platform = lookup(each.value, "min_cpu_platform", "")
labels = merge(
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ resource "google_container_node_pool" "pools" {
node_config {
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")
machine_type = lookup(each.value, "machine_type", "e2-medium")
min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
min_cpu_platform = lookup(each.value, "min_cpu_platform", "")
labels = merge(
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ resource "google_container_node_pool" "pools" {
node_config {
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")
machine_type = lookup(each.value, "machine_type", "e2-medium")
min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
min_cpu_platform = lookup(each.value, "min_cpu_platform", "")
labels = merge(
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},
Expand Down
2 changes: 1 addition & 1 deletion modules/private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ resource "google_container_node_pool" "pools" {
node_config {
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")
machine_type = lookup(each.value, "machine_type", "e2-medium")
min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
min_cpu_platform = lookup(each.value, "min_cpu_platform", "")
labels = merge(
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},
Expand Down
2 changes: 1 addition & 1 deletion modules/private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ resource "google_container_node_pool" "pools" {
node_config {
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")
machine_type = lookup(each.value, "machine_type", "e2-medium")
min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
min_cpu_platform = lookup(each.value, "min_cpu_platform", "")
labels = merge(
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},
Expand Down
4 changes: 2 additions & 2 deletions modules/safer-cluster-update-variant/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module "gke" {

initial_node_count = var.initial_node_count

// We suggest removing the default node pull, as it cannot be modified without
// We suggest removing the default node pool, as it cannot be modified without
// destroying the cluster.
remove_default_node_pool = true

Expand All @@ -99,7 +99,7 @@ module "gke" {

// We either:
// - Create a dedicated service account with minimal permissions to run nodes.
// All applications shuold run with an identity defined via Workload Identity anyway.
// All applications should run with an identity defined via Workload Identity anyway.
// - Use a service account passed as a parameter to the module, in case the user
// wants to maintain control of their service accounts.
create_service_account = var.compute_engine_service_account == "" ? true : false
Expand Down
4 changes: 2 additions & 2 deletions modules/safer-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module "gke" {

initial_node_count = var.initial_node_count

// We suggest removing the default node pull, as it cannot be modified without
// We suggest removing the default node pool, as it cannot be modified without
// destroying the cluster.
remove_default_node_pool = true

Expand All @@ -99,7 +99,7 @@ module "gke" {

// We either:
// - Create a dedicated service account with minimal permissions to run nodes.
// All applications shuold run with an identity defined via Workload Identity anyway.
// All applications should run with an identity defined via Workload Identity anyway.
// - Use a service account passed as a parameter to the module, in case the user
// wants to maintain control of their service accounts.
create_service_account = var.compute_engine_service_account == "" ? true : false
Expand Down

0 comments on commit 9f0f57d

Please sign in to comment.