From 019d06e57a4fc3e24229c9263bd19c1f93e6abec Mon Sep 17 00:00:00 2001 From: drfaust92 Date: Thu, 24 Jul 2025 18:20:52 -0400 Subject: [PATCH] feat: add support for felx_start Signed-off-by: drfaust92 --- README.md | 1 + autogen/main/README.md | 1 + autogen/main/cluster.tf.tmpl | 3 +++ cluster.tf | 3 +++ modules/beta-private-cluster-update-variant/README.md | 1 + modules/beta-private-cluster-update-variant/cluster.tf | 4 ++++ modules/beta-private-cluster/README.md | 1 + modules/beta-private-cluster/cluster.tf | 3 +++ modules/beta-public-cluster-update-variant/README.md | 1 + modules/beta-public-cluster-update-variant/cluster.tf | 4 ++++ modules/beta-public-cluster/README.md | 1 + modules/beta-public-cluster/cluster.tf | 3 +++ modules/private-cluster-update-variant/README.md | 1 + modules/private-cluster-update-variant/cluster.tf | 4 ++++ modules/private-cluster/README.md | 1 + modules/private-cluster/cluster.tf | 3 +++ 16 files changed, 35 insertions(+) diff --git a/README.md b/README.md index 51503cab35..4799223ed7 100644 --- a/README.md +++ b/README.md @@ -400,6 +400,7 @@ The node_pools variable takes the following parameters: | reservation_affinity_values | The list of label values of reservation resources. For example: the name of the specific reservation when using a key of "compute.googleapis.com/reservation-name". This should be passed as comma separated string. | | Optional | | local_ssd_encryption_mode | specifies the method used for encrypting the local SSDs attached to the node. Valid values are: "STANDARD_ENCRYPTION" and "EPHEMERAL_KEY_ENCRYPTION" | | Optional | | max_run_duration | The runtime of each node in the node pool in seconds, terminated by 's'. Example: "3600s". | null | Optional | +| flex_start | Enables Flex Start provisioning model for the node pool | null | Optional | ## windows_node_pools variable diff --git a/autogen/main/README.md b/autogen/main/README.md index b48be72be3..7e7bfe799d 100644 --- a/autogen/main/README.md +++ b/autogen/main/README.md @@ -285,6 +285,7 @@ The node_pools variable takes the following parameters: | reservation_affinity_values | The list of label values of reservation resources. For example: the name of the specific reservation when using a key of "compute.googleapis.com/reservation-name". This should be passed as comma separated string. | | Optional | | local_ssd_encryption_mode | specifies the method used for encrypting the local SSDs attached to the node. Valid values are: "STANDARD_ENCRYPTION" and "EPHEMERAL_KEY_ENCRYPTION" | | Optional | | max_run_duration | The runtime of each node in the node pool in seconds, terminated by 's'. Example: "3600s". | null | Optional | +| flex_start | Enables Flex Start provisioning model for the node pool | null | Optional | ## windows_node_pools variable diff --git a/autogen/main/cluster.tf.tmpl b/autogen/main/cluster.tf.tmpl index eaf88cf84f..c45145eb43 100644 --- a/autogen/main/cluster.tf.tmpl +++ b/autogen/main/cluster.tf.tmpl @@ -678,6 +678,7 @@ resource "google_container_cluster" "primary" { local_ssd_encryption_mode = lookup(var.node_pools[0], "local_ssd_encryption_mode", null) max_run_duration = lookup(var.node_pools[0], "max_run_duration", null) + flex_start = lookup(var.node_pools[0], "flex_start", null) } } {% endif %} @@ -846,6 +847,7 @@ locals { "secondary_boot_disk", "local_ssd_encryption_mode", "max_run_duration", + "flex_start", ] } @@ -1288,6 +1290,7 @@ resource "google_container_node_pool" "windows_pools" { local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null) max_run_duration = lookup(each.value, "max_run_duration", null) + flex_start = lookup(each.value, "flex_start", null) } lifecycle { diff --git a/cluster.tf b/cluster.tf index 923c71c411..d9a26d27a1 100644 --- a/cluster.tf +++ b/cluster.tf @@ -529,6 +529,7 @@ resource "google_container_cluster" "primary" { local_ssd_encryption_mode = lookup(var.node_pools[0], "local_ssd_encryption_mode", null) max_run_duration = lookup(var.node_pools[0], "max_run_duration", null) + flex_start = lookup(var.node_pools[0], "flex_start", null) } } @@ -975,6 +976,7 @@ resource "google_container_node_pool" "pools" { local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null) max_run_duration = lookup(each.value, "max_run_duration", null) + flex_start = lookup(each.value, "flex_start", null) } lifecycle { @@ -1306,6 +1308,7 @@ resource "google_container_node_pool" "windows_pools" { local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null) max_run_duration = lookup(each.value, "max_run_duration", null) + flex_start = lookup(each.value, "flex_start", null) } lifecycle { diff --git a/modules/beta-private-cluster-update-variant/README.md b/modules/beta-private-cluster-update-variant/README.md index 3272e07e6e..f5ca6c90a4 100644 --- a/modules/beta-private-cluster-update-variant/README.md +++ b/modules/beta-private-cluster-update-variant/README.md @@ -454,6 +454,7 @@ The node_pools variable takes the following parameters: | reservation_affinity_values | The list of label values of reservation resources. For example: the name of the specific reservation when using a key of "compute.googleapis.com/reservation-name". This should be passed as comma separated string. | | Optional | | local_ssd_encryption_mode | specifies the method used for encrypting the local SSDs attached to the node. Valid values are: "STANDARD_ENCRYPTION" and "EPHEMERAL_KEY_ENCRYPTION" | | Optional | | max_run_duration | The runtime of each node in the node pool in seconds, terminated by 's'. Example: "3600s". | null | Optional | +| flex_start | Enables Flex Start provisioning model for the node pool | null | Optional | ## windows_node_pools variable diff --git a/modules/beta-private-cluster-update-variant/cluster.tf b/modules/beta-private-cluster-update-variant/cluster.tf index eaf9e90b6f..b77082e17f 100644 --- a/modules/beta-private-cluster-update-variant/cluster.tf +++ b/modules/beta-private-cluster-update-variant/cluster.tf @@ -573,6 +573,7 @@ resource "google_container_cluster" "primary" { local_ssd_encryption_mode = lookup(var.node_pools[0], "local_ssd_encryption_mode", null) max_run_duration = lookup(var.node_pools[0], "max_run_duration", null) + flex_start = lookup(var.node_pools[0], "flex_start", null) } } @@ -725,6 +726,7 @@ locals { "secondary_boot_disk", "local_ssd_encryption_mode", "max_run_duration", + "flex_start", ] } @@ -1138,6 +1140,7 @@ resource "google_container_node_pool" "pools" { local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null) max_run_duration = lookup(each.value, "max_run_duration", null) + flex_start = lookup(each.value, "flex_start", null) } lifecycle { @@ -1483,6 +1486,7 @@ resource "google_container_node_pool" "windows_pools" { local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null) max_run_duration = lookup(each.value, "max_run_duration", null) + flex_start = lookup(each.value, "flex_start", null) } lifecycle { diff --git a/modules/beta-private-cluster/README.md b/modules/beta-private-cluster/README.md index 5fa58ebc7d..b555fd0073 100644 --- a/modules/beta-private-cluster/README.md +++ b/modules/beta-private-cluster/README.md @@ -432,6 +432,7 @@ The node_pools variable takes the following parameters: | reservation_affinity_values | The list of label values of reservation resources. For example: the name of the specific reservation when using a key of "compute.googleapis.com/reservation-name". This should be passed as comma separated string. | | Optional | | local_ssd_encryption_mode | specifies the method used for encrypting the local SSDs attached to the node. Valid values are: "STANDARD_ENCRYPTION" and "EPHEMERAL_KEY_ENCRYPTION" | | Optional | | max_run_duration | The runtime of each node in the node pool in seconds, terminated by 's'. Example: "3600s". | null | Optional | +| flex_start | Enables Flex Start provisioning model for the node pool | null | Optional | ## windows_node_pools variable diff --git a/modules/beta-private-cluster/cluster.tf b/modules/beta-private-cluster/cluster.tf index c64f4f3856..b32577b351 100644 --- a/modules/beta-private-cluster/cluster.tf +++ b/modules/beta-private-cluster/cluster.tf @@ -573,6 +573,7 @@ resource "google_container_cluster" "primary" { local_ssd_encryption_mode = lookup(var.node_pools[0], "local_ssd_encryption_mode", null) max_run_duration = lookup(var.node_pools[0], "max_run_duration", null) + flex_start = lookup(var.node_pools[0], "flex_start", null) } } @@ -1055,6 +1056,7 @@ resource "google_container_node_pool" "pools" { local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null) max_run_duration = lookup(each.value, "max_run_duration", null) + flex_start = lookup(each.value, "flex_start", null) } lifecycle { @@ -1399,6 +1401,7 @@ resource "google_container_node_pool" "windows_pools" { local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null) max_run_duration = lookup(each.value, "max_run_duration", null) + flex_start = lookup(each.value, "flex_start", null) } lifecycle { diff --git a/modules/beta-public-cluster-update-variant/README.md b/modules/beta-public-cluster-update-variant/README.md index df0a6dcebd..3868f53971 100644 --- a/modules/beta-public-cluster-update-variant/README.md +++ b/modules/beta-public-cluster-update-variant/README.md @@ -441,6 +441,7 @@ The node_pools variable takes the following parameters: | reservation_affinity_values | The list of label values of reservation resources. For example: the name of the specific reservation when using a key of "compute.googleapis.com/reservation-name". This should be passed as comma separated string. | | Optional | | local_ssd_encryption_mode | specifies the method used for encrypting the local SSDs attached to the node. Valid values are: "STANDARD_ENCRYPTION" and "EPHEMERAL_KEY_ENCRYPTION" | | Optional | | max_run_duration | The runtime of each node in the node pool in seconds, terminated by 's'. Example: "3600s". | null | Optional | +| flex_start | Enables Flex Start provisioning model for the node pool | null | Optional | ## windows_node_pools variable diff --git a/modules/beta-public-cluster-update-variant/cluster.tf b/modules/beta-public-cluster-update-variant/cluster.tf index 3fba3b693b..d242149071 100644 --- a/modules/beta-public-cluster-update-variant/cluster.tf +++ b/modules/beta-public-cluster-update-variant/cluster.tf @@ -573,6 +573,7 @@ resource "google_container_cluster" "primary" { local_ssd_encryption_mode = lookup(var.node_pools[0], "local_ssd_encryption_mode", null) max_run_duration = lookup(var.node_pools[0], "max_run_duration", null) + flex_start = lookup(var.node_pools[0], "flex_start", null) } } @@ -703,6 +704,7 @@ locals { "secondary_boot_disk", "local_ssd_encryption_mode", "max_run_duration", + "flex_start", ] } @@ -1116,6 +1118,7 @@ resource "google_container_node_pool" "pools" { local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null) max_run_duration = lookup(each.value, "max_run_duration", null) + flex_start = lookup(each.value, "flex_start", null) } lifecycle { @@ -1461,6 +1464,7 @@ resource "google_container_node_pool" "windows_pools" { local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null) max_run_duration = lookup(each.value, "max_run_duration", null) + flex_start = lookup(each.value, "flex_start", null) } lifecycle { diff --git a/modules/beta-public-cluster/README.md b/modules/beta-public-cluster/README.md index 0279d919ae..a93fdf84af 100644 --- a/modules/beta-public-cluster/README.md +++ b/modules/beta-public-cluster/README.md @@ -419,6 +419,7 @@ The node_pools variable takes the following parameters: | reservation_affinity_values | The list of label values of reservation resources. For example: the name of the specific reservation when using a key of "compute.googleapis.com/reservation-name". This should be passed as comma separated string. | | Optional | | local_ssd_encryption_mode | specifies the method used for encrypting the local SSDs attached to the node. Valid values are: "STANDARD_ENCRYPTION" and "EPHEMERAL_KEY_ENCRYPTION" | | Optional | | max_run_duration | The runtime of each node in the node pool in seconds, terminated by 's'. Example: "3600s". | null | Optional | +| flex_start | Enables Flex Start provisioning model for the node pool | null | Optional | ## windows_node_pools variable diff --git a/modules/beta-public-cluster/cluster.tf b/modules/beta-public-cluster/cluster.tf index 322cf89374..aaf21d7a33 100644 --- a/modules/beta-public-cluster/cluster.tf +++ b/modules/beta-public-cluster/cluster.tf @@ -573,6 +573,7 @@ resource "google_container_cluster" "primary" { local_ssd_encryption_mode = lookup(var.node_pools[0], "local_ssd_encryption_mode", null) max_run_duration = lookup(var.node_pools[0], "max_run_duration", null) + flex_start = lookup(var.node_pools[0], "flex_start", null) } } @@ -1033,6 +1034,7 @@ resource "google_container_node_pool" "pools" { local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null) max_run_duration = lookup(each.value, "max_run_duration", null) + flex_start = lookup(each.value, "flex_start", null) } lifecycle { @@ -1377,6 +1379,7 @@ resource "google_container_node_pool" "windows_pools" { local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null) max_run_duration = lookup(each.value, "max_run_duration", null) + flex_start = lookup(each.value, "flex_start", null) } lifecycle { diff --git a/modules/private-cluster-update-variant/README.md b/modules/private-cluster-update-variant/README.md index 96cb9fb369..6bf8729151 100644 --- a/modules/private-cluster-update-variant/README.md +++ b/modules/private-cluster-update-variant/README.md @@ -435,6 +435,7 @@ The node_pools variable takes the following parameters: | reservation_affinity_values | The list of label values of reservation resources. For example: the name of the specific reservation when using a key of "compute.googleapis.com/reservation-name". This should be passed as comma separated string. | | Optional | | local_ssd_encryption_mode | specifies the method used for encrypting the local SSDs attached to the node. Valid values are: "STANDARD_ENCRYPTION" and "EPHEMERAL_KEY_ENCRYPTION" | | Optional | | max_run_duration | The runtime of each node in the node pool in seconds, terminated by 's'. Example: "3600s". | null | Optional | +| flex_start | Enables Flex Start provisioning model for the node pool | null | Optional | ## windows_node_pools variable diff --git a/modules/private-cluster-update-variant/cluster.tf b/modules/private-cluster-update-variant/cluster.tf index 003f4df53e..79bcc92ffb 100644 --- a/modules/private-cluster-update-variant/cluster.tf +++ b/modules/private-cluster-update-variant/cluster.tf @@ -529,6 +529,7 @@ resource "google_container_cluster" "primary" { local_ssd_encryption_mode = lookup(var.node_pools[0], "local_ssd_encryption_mode", null) max_run_duration = lookup(var.node_pools[0], "max_run_duration", null) + flex_start = lookup(var.node_pools[0], "flex_start", null) } } @@ -679,6 +680,7 @@ locals { "secondary_boot_disk", "local_ssd_encryption_mode", "max_run_duration", + "flex_start", ] } @@ -1079,6 +1081,7 @@ resource "google_container_node_pool" "pools" { local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null) max_run_duration = lookup(each.value, "max_run_duration", null) + flex_start = lookup(each.value, "flex_start", null) } lifecycle { @@ -1411,6 +1414,7 @@ resource "google_container_node_pool" "windows_pools" { local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null) max_run_duration = lookup(each.value, "max_run_duration", null) + flex_start = lookup(each.value, "flex_start", null) } lifecycle { diff --git a/modules/private-cluster/README.md b/modules/private-cluster/README.md index a37139058d..ab29e57aba 100644 --- a/modules/private-cluster/README.md +++ b/modules/private-cluster/README.md @@ -413,6 +413,7 @@ The node_pools variable takes the following parameters: | reservation_affinity_values | The list of label values of reservation resources. For example: the name of the specific reservation when using a key of "compute.googleapis.com/reservation-name". This should be passed as comma separated string. | | Optional | | local_ssd_encryption_mode | specifies the method used for encrypting the local SSDs attached to the node. Valid values are: "STANDARD_ENCRYPTION" and "EPHEMERAL_KEY_ENCRYPTION" | | Optional | | max_run_duration | The runtime of each node in the node pool in seconds, terminated by 's'. Example: "3600s". | null | Optional | +| flex_start | Enables Flex Start provisioning model for the node pool | null | Optional | ## windows_node_pools variable diff --git a/modules/private-cluster/cluster.tf b/modules/private-cluster/cluster.tf index 1ba5da2c37..70c169c55d 100644 --- a/modules/private-cluster/cluster.tf +++ b/modules/private-cluster/cluster.tf @@ -529,6 +529,7 @@ resource "google_container_cluster" "primary" { local_ssd_encryption_mode = lookup(var.node_pools[0], "local_ssd_encryption_mode", null) max_run_duration = lookup(var.node_pools[0], "max_run_duration", null) + flex_start = lookup(var.node_pools[0], "flex_start", null) } } @@ -997,6 +998,7 @@ resource "google_container_node_pool" "pools" { local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null) max_run_duration = lookup(each.value, "max_run_duration", null) + flex_start = lookup(each.value, "flex_start", null) } lifecycle { @@ -1328,6 +1330,7 @@ resource "google_container_node_pool" "windows_pools" { local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null) max_run_duration = lookup(each.value, "max_run_duration", null) + flex_start = lookup(each.value, "flex_start", null) } lifecycle {