Skip to content

Commit

Permalink
feat!: update variant - recreate node pools on max_pods_per_node or p…
Browse files Browse the repository at this point in the history
…od_range change (#1464)

* fix: add missing max_pods_per_node & pod_range keepers for update variant module

* max_pods_per_node & pod_range keepers autogen
  • Loading branch information
splichy committed Nov 17, 2022
1 parent 4278f2c commit b006593
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
7 changes: 5 additions & 2 deletions autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,9 @@ locals {
"enable_integrity_monitoring",
"local_ssd_count",
"machine_type",
"max_pods_per_node",
"min_cpu_platform",
"pod_range",
"preemptible",
"spot",
"service_account",
Expand All @@ -508,8 +510,9 @@ locals {
}

# This keepers list is based on the terraform google provider schemaNodeConfig
# resources where "ForceNew" is "true". schemaNodeConfig can be found in node_config.go at
# https://github.com/terraform-providers/terraform-provider-google/blob/master/google/node_config.go#L22
# resources where "ForceNew" is "true". schemaNodeConfig can be found in resource_container_node_pool.go at
# https://github.com/hashicorp/terraform-provider-google/blob/main/google/resource_container_node_pool.go and node_config.go at
# https://github.com/terraform-providers/terraform-provider-google/blob/main/google/node_config.go
resource "random_id" "name" {
for_each = merge(local.node_pools, local.windows_node_pools)
byte_length = 2
Expand Down
7 changes: 5 additions & 2 deletions modules/beta-private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,9 @@ locals {
"enable_integrity_monitoring",
"local_ssd_count",
"machine_type",
"max_pods_per_node",
"min_cpu_platform",
"pod_range",
"preemptible",
"spot",
"service_account",
Expand All @@ -448,8 +450,9 @@ locals {
}

# This keepers list is based on the terraform google provider schemaNodeConfig
# resources where "ForceNew" is "true". schemaNodeConfig can be found in node_config.go at
# https://github.com/terraform-providers/terraform-provider-google/blob/master/google/node_config.go#L22
# resources where "ForceNew" is "true". schemaNodeConfig can be found in resource_container_node_pool.go at
# https://github.com/hashicorp/terraform-provider-google/blob/main/google/resource_container_node_pool.go and node_config.go at
# https://github.com/terraform-providers/terraform-provider-google/blob/main/google/node_config.go
resource "random_id" "name" {
for_each = merge(local.node_pools, local.windows_node_pools)
byte_length = 2
Expand Down
7 changes: 5 additions & 2 deletions modules/beta-public-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,9 @@ locals {
"enable_integrity_monitoring",
"local_ssd_count",
"machine_type",
"max_pods_per_node",
"min_cpu_platform",
"pod_range",
"preemptible",
"spot",
"service_account",
Expand All @@ -429,8 +431,9 @@ locals {
}

# This keepers list is based on the terraform google provider schemaNodeConfig
# resources where "ForceNew" is "true". schemaNodeConfig can be found in node_config.go at
# https://github.com/terraform-providers/terraform-provider-google/blob/master/google/node_config.go#L22
# resources where "ForceNew" is "true". schemaNodeConfig can be found in resource_container_node_pool.go at
# https://github.com/hashicorp/terraform-provider-google/blob/main/google/resource_container_node_pool.go and node_config.go at
# https://github.com/terraform-providers/terraform-provider-google/blob/main/google/node_config.go
resource "random_id" "name" {
for_each = merge(local.node_pools, local.windows_node_pools)
byte_length = 2
Expand Down
7 changes: 5 additions & 2 deletions modules/private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,9 @@ locals {
"enable_integrity_monitoring",
"local_ssd_count",
"machine_type",
"max_pods_per_node",
"min_cpu_platform",
"pod_range",
"preemptible",
"spot",
"service_account",
Expand All @@ -340,8 +342,9 @@ locals {
}

# This keepers list is based on the terraform google provider schemaNodeConfig
# resources where "ForceNew" is "true". schemaNodeConfig can be found in node_config.go at
# https://github.com/terraform-providers/terraform-provider-google/blob/master/google/node_config.go#L22
# resources where "ForceNew" is "true". schemaNodeConfig can be found in resource_container_node_pool.go at
# https://github.com/hashicorp/terraform-provider-google/blob/main/google/resource_container_node_pool.go and node_config.go at
# https://github.com/terraform-providers/terraform-provider-google/blob/main/google/node_config.go
resource "random_id" "name" {
for_each = merge(local.node_pools, local.windows_node_pools)
byte_length = 2
Expand Down

0 comments on commit b006593

Please sign in to comment.