diff --git a/README.md b/README.md index 001005324b..6369e15371 100644 --- a/README.md +++ b/README.md @@ -402,6 +402,10 @@ The node_pools variable takes the following parameters: The windows_node_pools variable takes the same parameters as [node_pools](#node\_pools-variable) but is reserved for provisioning Windows based node pools only. This variable is introduced to satisfy a [specific requirement](https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-cluster-windows#create_a_cluster_and_node_pools) for the presence of at least one linux based node pool in the cluster before a windows based node pool can be created. +| Name | Description | Default | Requirement | +| --- | --- | --- | --- | +| windows_node_config_os_version | The Windows OS version to use for the windows node pool. Valid values are OS_VERSION_UNSPECIFIED, OS_VERSION_LTSC2019 and OS_VERSION_LTSC2022. | null | Optional | + ## Requirements diff --git a/autogen/main/README.md b/autogen/main/README.md index 31a4a6c474..490174d465 100644 --- a/autogen/main/README.md +++ b/autogen/main/README.md @@ -289,6 +289,10 @@ The node_pools variable takes the following parameters: The windows_node_pools variable takes the same parameters as [node_pools](#node\_pools-variable) but is reserved for provisioning Windows based node pools only. This variable is introduced to satisfy a [specific requirement](https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-cluster-windows#create_a_cluster_and_node_pools) for the presence of at least one linux based node pool in the cluster before a windows based node pool can be created. +| Name | Description | Default | Requirement | +| --- | --- | --- | --- | +| windows_node_config_os_version | The Windows OS version to use for the windows node pool. Valid values are OS_VERSION_UNSPECIFIED, OS_VERSION_LTSC2019 and OS_VERSION_LTSC2022. | null | Optional | + {% endif %} ## Requirements diff --git a/autogen/main/cluster.tf.tmpl b/autogen/main/cluster.tf.tmpl index 03bce60e58..d6b50c8ddc 100644 --- a/autogen/main/cluster.tf.tmpl +++ b/autogen/main/cluster.tf.tmpl @@ -1215,6 +1215,14 @@ resource "google_container_node_pool" "windows_pools" { } {% endif %} + dynamic "windows_node_config" { + for_each = lookup(each.value, "windows_node_config_os_version", null) != null ? [true] : [] + + content { + osversion = lookup(each.value, "windows_node_config_os_version", null) + } + } + {% if i == 0 %} dynamic "linux_node_config" { for_each = length(merge( diff --git a/autogen/main/variables.tf.tmpl b/autogen/main/variables.tf.tmpl index d5a46d0cb8..791d692d5d 100644 --- a/autogen/main/variables.tf.tmpl +++ b/autogen/main/variables.tf.tmpl @@ -256,6 +256,7 @@ variable "node_pools_linux_node_configs_sysctls" { default-node-pool = {} } } + variable "node_pools_cgroup_mode" { type = map(string) description = "Map of strings containing cgroup node config by node-pool name" @@ -295,6 +296,7 @@ variable "enable_cost_allocation" { description = "Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery" default = false } + variable "resource_usage_export_dataset_id" { type = string description = "The ID of a BigQuery Dataset for using BigQuery as the destination of resource usage export." diff --git a/cluster.tf b/cluster.tf index 00c79d775f..12fcee1c35 100644 --- a/cluster.tf +++ b/cluster.tf @@ -903,6 +903,14 @@ resource "google_container_node_pool" "pools" { } } + dynamic "windows_node_config" { + for_each = lookup(each.value, "windows_node_config_os_version", null) != null ? [true] : [] + + content { + osversion = lookup(each.value, "windows_node_config_os_version", null) + } + } + dynamic "linux_node_config" { for_each = length(merge( local.node_pools_linux_node_configs_sysctls["all"], @@ -1258,6 +1266,14 @@ resource "google_container_node_pool" "windows_pools" { } } + dynamic "windows_node_config" { + for_each = lookup(each.value, "windows_node_config_os_version", null) != null ? [true] : [] + + content { + osversion = lookup(each.value, "windows_node_config_os_version", null) + } + } + boot_disk_kms_key = lookup(each.value, "boot_disk_kms_key", "") storage_pools = lookup(each.value, "storage_pools", null) != null ? [each.value.storage_pools] : [] diff --git a/modules/beta-autopilot-private-cluster/variables.tf b/modules/beta-autopilot-private-cluster/variables.tf index d95e31d2a7..48ce577684 100644 --- a/modules/beta-autopilot-private-cluster/variables.tf +++ b/modules/beta-autopilot-private-cluster/variables.tf @@ -182,6 +182,7 @@ variable "enable_cost_allocation" { description = "Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery" default = false } + variable "resource_usage_export_dataset_id" { type = string description = "The ID of a BigQuery Dataset for using BigQuery as the destination of resource usage export." diff --git a/modules/beta-autopilot-public-cluster/variables.tf b/modules/beta-autopilot-public-cluster/variables.tf index 5f861cb692..16b0b48619 100644 --- a/modules/beta-autopilot-public-cluster/variables.tf +++ b/modules/beta-autopilot-public-cluster/variables.tf @@ -182,6 +182,7 @@ variable "enable_cost_allocation" { description = "Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery" default = false } + variable "resource_usage_export_dataset_id" { type = string description = "The ID of a BigQuery Dataset for using BigQuery as the destination of resource usage export." diff --git a/modules/beta-private-cluster-update-variant/README.md b/modules/beta-private-cluster-update-variant/README.md index 4f263995ab..2a968f46bd 100644 --- a/modules/beta-private-cluster-update-variant/README.md +++ b/modules/beta-private-cluster-update-variant/README.md @@ -456,6 +456,10 @@ The node_pools variable takes the following parameters: The windows_node_pools variable takes the same parameters as [node_pools](#node\_pools-variable) but is reserved for provisioning Windows based node pools only. This variable is introduced to satisfy a [specific requirement](https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-cluster-windows#create_a_cluster_and_node_pools) for the presence of at least one linux based node pool in the cluster before a windows based node pool can be created. +| Name | Description | Default | Requirement | +| --- | --- | --- | --- | +| windows_node_config_os_version | The Windows OS version to use for the windows node pool. Valid values are OS_VERSION_UNSPECIFIED, OS_VERSION_LTSC2019 and OS_VERSION_LTSC2022. | null | Optional | + ## Requirements diff --git a/modules/beta-private-cluster-update-variant/cluster.tf b/modules/beta-private-cluster-update-variant/cluster.tf index af150a5d67..9066309881 100644 --- a/modules/beta-private-cluster-update-variant/cluster.tf +++ b/modules/beta-private-cluster-update-variant/cluster.tf @@ -1067,6 +1067,14 @@ resource "google_container_node_pool" "pools" { } } + dynamic "windows_node_config" { + for_each = lookup(each.value, "windows_node_config_os_version", null) != null ? [true] : [] + + content { + osversion = lookup(each.value, "windows_node_config_os_version", null) + } + } + dynamic "linux_node_config" { for_each = length(merge( local.node_pools_linux_node_configs_sysctls["all"], @@ -1436,6 +1444,14 @@ resource "google_container_node_pool" "windows_pools" { } } + dynamic "windows_node_config" { + for_each = lookup(each.value, "windows_node_config_os_version", null) != null ? [true] : [] + + content { + osversion = lookup(each.value, "windows_node_config_os_version", null) + } + } + boot_disk_kms_key = lookup(each.value, "boot_disk_kms_key", "") storage_pools = lookup(each.value, "storage_pools", null) != null ? [each.value.storage_pools] : [] diff --git a/modules/beta-private-cluster-update-variant/variables.tf b/modules/beta-private-cluster-update-variant/variables.tf index 91915970a6..6036f13f3c 100644 --- a/modules/beta-private-cluster-update-variant/variables.tf +++ b/modules/beta-private-cluster-update-variant/variables.tf @@ -236,6 +236,7 @@ variable "node_pools_linux_node_configs_sysctls" { default-node-pool = {} } } + variable "node_pools_cgroup_mode" { type = map(string) description = "Map of strings containing cgroup node config by node-pool name" @@ -274,6 +275,7 @@ variable "enable_cost_allocation" { description = "Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery" default = false } + variable "resource_usage_export_dataset_id" { type = string description = "The ID of a BigQuery Dataset for using BigQuery as the destination of resource usage export." diff --git a/modules/beta-private-cluster/README.md b/modules/beta-private-cluster/README.md index 42c907e9df..588b695408 100644 --- a/modules/beta-private-cluster/README.md +++ b/modules/beta-private-cluster/README.md @@ -434,6 +434,10 @@ The node_pools variable takes the following parameters: The windows_node_pools variable takes the same parameters as [node_pools](#node\_pools-variable) but is reserved for provisioning Windows based node pools only. This variable is introduced to satisfy a [specific requirement](https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-cluster-windows#create_a_cluster_and_node_pools) for the presence of at least one linux based node pool in the cluster before a windows based node pool can be created. +| Name | Description | Default | Requirement | +| --- | --- | --- | --- | +| windows_node_config_os_version | The Windows OS version to use for the windows node pool. Valid values are OS_VERSION_UNSPECIFIED, OS_VERSION_LTSC2019 and OS_VERSION_LTSC2022. | null | Optional | + ## Requirements diff --git a/modules/beta-private-cluster/cluster.tf b/modules/beta-private-cluster/cluster.tf index 110beb7f24..72db246e91 100644 --- a/modules/beta-private-cluster/cluster.tf +++ b/modules/beta-private-cluster/cluster.tf @@ -984,6 +984,14 @@ resource "google_container_node_pool" "pools" { } } + dynamic "windows_node_config" { + for_each = lookup(each.value, "windows_node_config_os_version", null) != null ? [true] : [] + + content { + osversion = lookup(each.value, "windows_node_config_os_version", null) + } + } + dynamic "linux_node_config" { for_each = length(merge( local.node_pools_linux_node_configs_sysctls["all"], @@ -1352,6 +1360,14 @@ resource "google_container_node_pool" "windows_pools" { } } + dynamic "windows_node_config" { + for_each = lookup(each.value, "windows_node_config_os_version", null) != null ? [true] : [] + + content { + osversion = lookup(each.value, "windows_node_config_os_version", null) + } + } + boot_disk_kms_key = lookup(each.value, "boot_disk_kms_key", "") storage_pools = lookup(each.value, "storage_pools", null) != null ? [each.value.storage_pools] : [] diff --git a/modules/beta-private-cluster/variables.tf b/modules/beta-private-cluster/variables.tf index 91915970a6..6036f13f3c 100644 --- a/modules/beta-private-cluster/variables.tf +++ b/modules/beta-private-cluster/variables.tf @@ -236,6 +236,7 @@ variable "node_pools_linux_node_configs_sysctls" { default-node-pool = {} } } + variable "node_pools_cgroup_mode" { type = map(string) description = "Map of strings containing cgroup node config by node-pool name" @@ -274,6 +275,7 @@ variable "enable_cost_allocation" { description = "Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery" default = false } + variable "resource_usage_export_dataset_id" { type = string description = "The ID of a BigQuery Dataset for using BigQuery as the destination of resource usage export." diff --git a/modules/beta-public-cluster-update-variant/README.md b/modules/beta-public-cluster-update-variant/README.md index e5b32cc94c..cf912fa076 100644 --- a/modules/beta-public-cluster-update-variant/README.md +++ b/modules/beta-public-cluster-update-variant/README.md @@ -443,6 +443,10 @@ The node_pools variable takes the following parameters: The windows_node_pools variable takes the same parameters as [node_pools](#node\_pools-variable) but is reserved for provisioning Windows based node pools only. This variable is introduced to satisfy a [specific requirement](https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-cluster-windows#create_a_cluster_and_node_pools) for the presence of at least one linux based node pool in the cluster before a windows based node pool can be created. +| Name | Description | Default | Requirement | +| --- | --- | --- | --- | +| windows_node_config_os_version | The Windows OS version to use for the windows node pool. Valid values are OS_VERSION_UNSPECIFIED, OS_VERSION_LTSC2019 and OS_VERSION_LTSC2022. | null | Optional | + ## Requirements diff --git a/modules/beta-public-cluster-update-variant/cluster.tf b/modules/beta-public-cluster-update-variant/cluster.tf index b8119b4791..69b0dec658 100644 --- a/modules/beta-public-cluster-update-variant/cluster.tf +++ b/modules/beta-public-cluster-update-variant/cluster.tf @@ -1045,6 +1045,14 @@ resource "google_container_node_pool" "pools" { } } + dynamic "windows_node_config" { + for_each = lookup(each.value, "windows_node_config_os_version", null) != null ? [true] : [] + + content { + osversion = lookup(each.value, "windows_node_config_os_version", null) + } + } + dynamic "linux_node_config" { for_each = length(merge( local.node_pools_linux_node_configs_sysctls["all"], @@ -1414,6 +1422,14 @@ resource "google_container_node_pool" "windows_pools" { } } + dynamic "windows_node_config" { + for_each = lookup(each.value, "windows_node_config_os_version", null) != null ? [true] : [] + + content { + osversion = lookup(each.value, "windows_node_config_os_version", null) + } + } + boot_disk_kms_key = lookup(each.value, "boot_disk_kms_key", "") storage_pools = lookup(each.value, "storage_pools", null) != null ? [each.value.storage_pools] : [] diff --git a/modules/beta-public-cluster-update-variant/variables.tf b/modules/beta-public-cluster-update-variant/variables.tf index d626499f6a..a2323b0ec8 100644 --- a/modules/beta-public-cluster-update-variant/variables.tf +++ b/modules/beta-public-cluster-update-variant/variables.tf @@ -236,6 +236,7 @@ variable "node_pools_linux_node_configs_sysctls" { default-node-pool = {} } } + variable "node_pools_cgroup_mode" { type = map(string) description = "Map of strings containing cgroup node config by node-pool name" @@ -274,6 +275,7 @@ variable "enable_cost_allocation" { description = "Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery" default = false } + variable "resource_usage_export_dataset_id" { type = string description = "The ID of a BigQuery Dataset for using BigQuery as the destination of resource usage export." diff --git a/modules/beta-public-cluster/README.md b/modules/beta-public-cluster/README.md index bef1ae63ed..82f5f629a8 100644 --- a/modules/beta-public-cluster/README.md +++ b/modules/beta-public-cluster/README.md @@ -421,6 +421,10 @@ The node_pools variable takes the following parameters: The windows_node_pools variable takes the same parameters as [node_pools](#node\_pools-variable) but is reserved for provisioning Windows based node pools only. This variable is introduced to satisfy a [specific requirement](https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-cluster-windows#create_a_cluster_and_node_pools) for the presence of at least one linux based node pool in the cluster before a windows based node pool can be created. +| Name | Description | Default | Requirement | +| --- | --- | --- | --- | +| windows_node_config_os_version | The Windows OS version to use for the windows node pool. Valid values are OS_VERSION_UNSPECIFIED, OS_VERSION_LTSC2019 and OS_VERSION_LTSC2022. | null | Optional | + ## Requirements diff --git a/modules/beta-public-cluster/cluster.tf b/modules/beta-public-cluster/cluster.tf index 375a74407e..104a037d2f 100644 --- a/modules/beta-public-cluster/cluster.tf +++ b/modules/beta-public-cluster/cluster.tf @@ -962,6 +962,14 @@ resource "google_container_node_pool" "pools" { } } + dynamic "windows_node_config" { + for_each = lookup(each.value, "windows_node_config_os_version", null) != null ? [true] : [] + + content { + osversion = lookup(each.value, "windows_node_config_os_version", null) + } + } + dynamic "linux_node_config" { for_each = length(merge( local.node_pools_linux_node_configs_sysctls["all"], @@ -1330,6 +1338,14 @@ resource "google_container_node_pool" "windows_pools" { } } + dynamic "windows_node_config" { + for_each = lookup(each.value, "windows_node_config_os_version", null) != null ? [true] : [] + + content { + osversion = lookup(each.value, "windows_node_config_os_version", null) + } + } + boot_disk_kms_key = lookup(each.value, "boot_disk_kms_key", "") storage_pools = lookup(each.value, "storage_pools", null) != null ? [each.value.storage_pools] : [] diff --git a/modules/beta-public-cluster/variables.tf b/modules/beta-public-cluster/variables.tf index d626499f6a..a2323b0ec8 100644 --- a/modules/beta-public-cluster/variables.tf +++ b/modules/beta-public-cluster/variables.tf @@ -236,6 +236,7 @@ variable "node_pools_linux_node_configs_sysctls" { default-node-pool = {} } } + variable "node_pools_cgroup_mode" { type = map(string) description = "Map of strings containing cgroup node config by node-pool name" @@ -274,6 +275,7 @@ variable "enable_cost_allocation" { description = "Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery" default = false } + variable "resource_usage_export_dataset_id" { type = string description = "The ID of a BigQuery Dataset for using BigQuery as the destination of resource usage export." diff --git a/modules/private-cluster-update-variant/README.md b/modules/private-cluster-update-variant/README.md index 3eb897e734..82512d18a4 100644 --- a/modules/private-cluster-update-variant/README.md +++ b/modules/private-cluster-update-variant/README.md @@ -437,6 +437,10 @@ The node_pools variable takes the following parameters: The windows_node_pools variable takes the same parameters as [node_pools](#node\_pools-variable) but is reserved for provisioning Windows based node pools only. This variable is introduced to satisfy a [specific requirement](https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-cluster-windows#create_a_cluster_and_node_pools) for the presence of at least one linux based node pool in the cluster before a windows based node pool can be created. +| Name | Description | Default | Requirement | +| --- | --- | --- | --- | +| windows_node_config_os_version | The Windows OS version to use for the windows node pool. Valid values are OS_VERSION_UNSPECIFIED, OS_VERSION_LTSC2019 and OS_VERSION_LTSC2022. | null | Optional | + ## Requirements diff --git a/modules/private-cluster-update-variant/cluster.tf b/modules/private-cluster-update-variant/cluster.tf index 7993e25872..75f6527d8c 100644 --- a/modules/private-cluster-update-variant/cluster.tf +++ b/modules/private-cluster-update-variant/cluster.tf @@ -1007,6 +1007,14 @@ resource "google_container_node_pool" "pools" { } } + dynamic "windows_node_config" { + for_each = lookup(each.value, "windows_node_config_os_version", null) != null ? [true] : [] + + content { + osversion = lookup(each.value, "windows_node_config_os_version", null) + } + } + dynamic "linux_node_config" { for_each = length(merge( local.node_pools_linux_node_configs_sysctls["all"], @@ -1363,6 +1371,14 @@ resource "google_container_node_pool" "windows_pools" { } } + dynamic "windows_node_config" { + for_each = lookup(each.value, "windows_node_config_os_version", null) != null ? [true] : [] + + content { + osversion = lookup(each.value, "windows_node_config_os_version", null) + } + } + boot_disk_kms_key = lookup(each.value, "boot_disk_kms_key", "") storage_pools = lookup(each.value, "storage_pools", null) != null ? [each.value.storage_pools] : [] diff --git a/modules/private-cluster-update-variant/variables.tf b/modules/private-cluster-update-variant/variables.tf index a06456b25a..0ad249e4ef 100644 --- a/modules/private-cluster-update-variant/variables.tf +++ b/modules/private-cluster-update-variant/variables.tf @@ -236,6 +236,7 @@ variable "node_pools_linux_node_configs_sysctls" { default-node-pool = {} } } + variable "node_pools_cgroup_mode" { type = map(string) description = "Map of strings containing cgroup node config by node-pool name" @@ -274,6 +275,7 @@ variable "enable_cost_allocation" { description = "Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery" default = false } + variable "resource_usage_export_dataset_id" { type = string description = "The ID of a BigQuery Dataset for using BigQuery as the destination of resource usage export." diff --git a/modules/private-cluster/README.md b/modules/private-cluster/README.md index 225e232127..70198f6c9d 100644 --- a/modules/private-cluster/README.md +++ b/modules/private-cluster/README.md @@ -415,6 +415,10 @@ The node_pools variable takes the following parameters: The windows_node_pools variable takes the same parameters as [node_pools](#node\_pools-variable) but is reserved for provisioning Windows based node pools only. This variable is introduced to satisfy a [specific requirement](https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-cluster-windows#create_a_cluster_and_node_pools) for the presence of at least one linux based node pool in the cluster before a windows based node pool can be created. +| Name | Description | Default | Requirement | +| --- | --- | --- | --- | +| windows_node_config_os_version | The Windows OS version to use for the windows node pool. Valid values are OS_VERSION_UNSPECIFIED, OS_VERSION_LTSC2019 and OS_VERSION_LTSC2022. | null | Optional | + ## Requirements diff --git a/modules/private-cluster/cluster.tf b/modules/private-cluster/cluster.tf index d1de0d257c..034eab60db 100644 --- a/modules/private-cluster/cluster.tf +++ b/modules/private-cluster/cluster.tf @@ -925,6 +925,14 @@ resource "google_container_node_pool" "pools" { } } + dynamic "windows_node_config" { + for_each = lookup(each.value, "windows_node_config_os_version", null) != null ? [true] : [] + + content { + osversion = lookup(each.value, "windows_node_config_os_version", null) + } + } + dynamic "linux_node_config" { for_each = length(merge( local.node_pools_linux_node_configs_sysctls["all"], @@ -1280,6 +1288,14 @@ resource "google_container_node_pool" "windows_pools" { } } + dynamic "windows_node_config" { + for_each = lookup(each.value, "windows_node_config_os_version", null) != null ? [true] : [] + + content { + osversion = lookup(each.value, "windows_node_config_os_version", null) + } + } + boot_disk_kms_key = lookup(each.value, "boot_disk_kms_key", "") storage_pools = lookup(each.value, "storage_pools", null) != null ? [each.value.storage_pools] : [] diff --git a/modules/private-cluster/variables.tf b/modules/private-cluster/variables.tf index a06456b25a..0ad249e4ef 100644 --- a/modules/private-cluster/variables.tf +++ b/modules/private-cluster/variables.tf @@ -236,6 +236,7 @@ variable "node_pools_linux_node_configs_sysctls" { default-node-pool = {} } } + variable "node_pools_cgroup_mode" { type = map(string) description = "Map of strings containing cgroup node config by node-pool name" @@ -274,6 +275,7 @@ variable "enable_cost_allocation" { description = "Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery" default = false } + variable "resource_usage_export_dataset_id" { type = string description = "The ID of a BigQuery Dataset for using BigQuery as the destination of resource usage export." diff --git a/variables.tf b/variables.tf index 8c31c7a5e5..e8baee0765 100644 --- a/variables.tf +++ b/variables.tf @@ -236,6 +236,7 @@ variable "node_pools_linux_node_configs_sysctls" { default-node-pool = {} } } + variable "node_pools_cgroup_mode" { type = map(string) description = "Map of strings containing cgroup node config by node-pool name" @@ -274,6 +275,7 @@ variable "enable_cost_allocation" { description = "Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery" default = false } + variable "resource_usage_export_dataset_id" { type = string description = "The ID of a BigQuery Dataset for using BigQuery as the destination of resource usage export."