diff --git a/autogen/main/cluster.tf.tmpl b/autogen/main/cluster.tf.tmpl index b3dffb490d..cfda50f762 100644 --- a/autogen/main/cluster.tf.tmpl +++ b/autogen/main/cluster.tf.tmpl @@ -313,6 +313,10 @@ resource "google_container_cluster" "primary" { disabled = !var.horizontal_pod_autoscaling } + gcp_filestore_csi_driver_config { + enabled = var.filestore_csi_driver + } + {% if autopilot_cluster != true %} network_policy_config { disabled = !var.network_policy @@ -322,10 +326,6 @@ resource "google_container_cluster" "primary" { enabled = var.dns_cache } - gcp_filestore_csi_driver_config { - enabled = var.filestore_csi_driver - } - dynamic "gce_persistent_disk_csi_driver_config" { for_each = local.cluster_gce_pd_csi_config diff --git a/autogen/main/variables.tf.tmpl b/autogen/main/variables.tf.tmpl index 7466acecd9..26ffc812fe 100644 --- a/autogen/main/variables.tf.tmpl +++ b/autogen/main/variables.tf.tmpl @@ -696,6 +696,12 @@ variable "enable_tpu" { default = false } +variable "filestore_csi_driver" { + type = bool + description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes" + default = false +} + {% if autopilot_cluster != true %} variable "network_policy" { type = bool @@ -721,12 +727,6 @@ variable "remove_default_node_pool" { default = false } -variable "filestore_csi_driver" { - type = bool - description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes" - default = false -} - variable "disable_legacy_metadata_endpoints" { type = bool description = "Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated." diff --git a/autogen/main/versions.tf.tmpl b/autogen/main/versions.tf.tmpl index e20bc44b3e..d3e42792be 100644 --- a/autogen/main/versions.tf.tmpl +++ b/autogen/main/versions.tf.tmpl @@ -46,13 +46,11 @@ terraform { required_providers { google = { source = "hashicorp/google" - # Workaround for https://github.com/hashicorp/terraform-provider-google/issues/19428 - version = ">= 5.40.0, != 5.44.0, != 6.2.0, != 6.3.0, < 7" + version = ">= 6.5.0, < 7" } google-beta = { source = "hashicorp/google-beta" - # Workaround for https://github.com/hashicorp/terraform-provider-google/issues/19428 - version = ">= 5.40.0, != 5.44.0, != 6.2.0, != 6.3.0, < 7" + version = ">= 6.5.0, < 7" } kubernetes = { source = "hashicorp/kubernetes" @@ -70,8 +68,7 @@ terraform { required_providers { google = { source = "hashicorp/google" - # Workaround for https://github.com/hashicorp/terraform-provider-google/issues/19428 - version = ">= 5.40.0, != 5.44.0, != 6.2.0, != 6.3.0, < 7" + version = ">= 6.5.0, < 7" } kubernetes = { source = "hashicorp/kubernetes" diff --git a/cluster.tf b/cluster.tf index 24fc980d55..d4643f9ede 100644 --- a/cluster.tf +++ b/cluster.tf @@ -234,6 +234,10 @@ resource "google_container_cluster" "primary" { disabled = !var.horizontal_pod_autoscaling } + gcp_filestore_csi_driver_config { + enabled = var.filestore_csi_driver + } + network_policy_config { disabled = !var.network_policy } @@ -242,10 +246,6 @@ resource "google_container_cluster" "primary" { enabled = var.dns_cache } - gcp_filestore_csi_driver_config { - enabled = var.filestore_csi_driver - } - dynamic "gce_persistent_disk_csi_driver_config" { for_each = local.cluster_gce_pd_csi_config diff --git a/modules/beta-autopilot-private-cluster/README.md b/modules/beta-autopilot-private-cluster/README.md index bbd101ad5b..f2e217c6e3 100644 --- a/modules/beta-autopilot-private-cluster/README.md +++ b/modules/beta-autopilot-private-cluster/README.md @@ -102,6 +102,7 @@ Then perform the following commands on the root folder: | enable\_secret\_manager\_addon | (Beta) Enable the Secret Manager add-on for this cluster | `bool` | `false` | no | | enable\_tpu | Enable Cloud TPU resources in the cluster. WARNING: changing this after cluster creation is destructive! | `bool` | `false` | no | | enable\_vertical\_pod\_autoscaling | Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it | `bool` | `true` | no | +| filestore\_csi\_driver | The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes | `bool` | `false` | no | | firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers. Either flag `add_master_webhook_firewall_rules` or `add_cluster_firewall_rules` (also adds egress rules) must be set to `true` for inbound-ports firewall rules to be applied. | `list(string)` |
[
"8443",
"9443",
"15017"
]
| no | | firewall\_priority | Priority rule for firewall rules | `number` | `1000` | no | | fleet\_project | (Optional) Register the cluster with the fleet in this project. | `string` | `null` | no | diff --git a/modules/beta-autopilot-private-cluster/cluster.tf b/modules/beta-autopilot-private-cluster/cluster.tf index f6716e75bf..478f1a1d7f 100644 --- a/modules/beta-autopilot-private-cluster/cluster.tf +++ b/modules/beta-autopilot-private-cluster/cluster.tf @@ -150,6 +150,10 @@ resource "google_container_cluster" "primary" { disabled = !var.horizontal_pod_autoscaling } + gcp_filestore_csi_driver_config { + enabled = var.filestore_csi_driver + } + dynamic "gke_backup_agent_config" { for_each = local.gke_backup_agent_config diff --git a/modules/beta-autopilot-private-cluster/variables.tf b/modules/beta-autopilot-private-cluster/variables.tf index 19a37b243a..6a96278190 100644 --- a/modules/beta-autopilot-private-cluster/variables.tf +++ b/modules/beta-autopilot-private-cluster/variables.tf @@ -454,6 +454,12 @@ variable "enable_tpu" { default = false } +variable "filestore_csi_driver" { + type = bool + description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes" + default = false +} + variable "database_encryption" { description = "Application-layer Secrets Encryption settings. The object format is {state = string, key_name = string}. Valid values of state are: \"ENCRYPTED\"; \"DECRYPTED\". key_name is the name of a CloudKMS key." type = list(object({ state = string, key_name = string })) diff --git a/modules/beta-autopilot-private-cluster/versions.tf b/modules/beta-autopilot-private-cluster/versions.tf index daa0faa199..fa5a37cf4d 100644 --- a/modules/beta-autopilot-private-cluster/versions.tf +++ b/modules/beta-autopilot-private-cluster/versions.tf @@ -20,14 +20,12 @@ terraform { required_providers { google = { - source = "hashicorp/google" - # Workaround for https://github.com/hashicorp/terraform-provider-google/issues/19428 - version = ">= 5.40.0, != 5.44.0, != 6.2.0, != 6.3.0, < 7" + source = "hashicorp/google" + version = ">= 6.5.0, < 7" } google-beta = { - source = "hashicorp/google-beta" - # Workaround for https://github.com/hashicorp/terraform-provider-google/issues/19428 - version = ">= 5.40.0, != 5.44.0, != 6.2.0, != 6.3.0, < 7" + source = "hashicorp/google-beta" + version = ">= 6.5.0, < 7" } kubernetes = { source = "hashicorp/kubernetes" diff --git a/modules/beta-autopilot-public-cluster/README.md b/modules/beta-autopilot-public-cluster/README.md index 52614332f8..f4f5a0dfc7 100644 --- a/modules/beta-autopilot-public-cluster/README.md +++ b/modules/beta-autopilot-public-cluster/README.md @@ -93,6 +93,7 @@ Then perform the following commands on the root folder: | enable\_secret\_manager\_addon | (Beta) Enable the Secret Manager add-on for this cluster | `bool` | `false` | no | | enable\_tpu | Enable Cloud TPU resources in the cluster. WARNING: changing this after cluster creation is destructive! | `bool` | `false` | no | | enable\_vertical\_pod\_autoscaling | Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it | `bool` | `true` | no | +| filestore\_csi\_driver | The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes | `bool` | `false` | no | | firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers. Either flag `add_master_webhook_firewall_rules` or `add_cluster_firewall_rules` (also adds egress rules) must be set to `true` for inbound-ports firewall rules to be applied. | `list(string)` |
[
"8443",
"9443",
"15017"
]
| no | | firewall\_priority | Priority rule for firewall rules | `number` | `1000` | no | | fleet\_project | (Optional) Register the cluster with the fleet in this project. | `string` | `null` | no | diff --git a/modules/beta-autopilot-public-cluster/cluster.tf b/modules/beta-autopilot-public-cluster/cluster.tf index 728ef8cb71..8c60b02120 100644 --- a/modules/beta-autopilot-public-cluster/cluster.tf +++ b/modules/beta-autopilot-public-cluster/cluster.tf @@ -150,6 +150,10 @@ resource "google_container_cluster" "primary" { disabled = !var.horizontal_pod_autoscaling } + gcp_filestore_csi_driver_config { + enabled = var.filestore_csi_driver + } + dynamic "gke_backup_agent_config" { for_each = local.gke_backup_agent_config diff --git a/modules/beta-autopilot-public-cluster/variables.tf b/modules/beta-autopilot-public-cluster/variables.tf index 377b5c561c..aa53aef543 100644 --- a/modules/beta-autopilot-public-cluster/variables.tf +++ b/modules/beta-autopilot-public-cluster/variables.tf @@ -418,6 +418,12 @@ variable "enable_tpu" { default = false } +variable "filestore_csi_driver" { + type = bool + description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes" + default = false +} + variable "database_encryption" { description = "Application-layer Secrets Encryption settings. The object format is {state = string, key_name = string}. Valid values of state are: \"ENCRYPTED\"; \"DECRYPTED\". key_name is the name of a CloudKMS key." type = list(object({ state = string, key_name = string })) diff --git a/modules/beta-autopilot-public-cluster/versions.tf b/modules/beta-autopilot-public-cluster/versions.tf index daffa17c4d..4b0b9c8043 100644 --- a/modules/beta-autopilot-public-cluster/versions.tf +++ b/modules/beta-autopilot-public-cluster/versions.tf @@ -20,14 +20,12 @@ terraform { required_providers { google = { - source = "hashicorp/google" - # Workaround for https://github.com/hashicorp/terraform-provider-google/issues/19428 - version = ">= 5.40.0, != 5.44.0, != 6.2.0, != 6.3.0, < 7" + source = "hashicorp/google" + version = ">= 6.5.0, < 7" } google-beta = { - source = "hashicorp/google-beta" - # Workaround for https://github.com/hashicorp/terraform-provider-google/issues/19428 - version = ">= 5.40.0, != 5.44.0, != 6.2.0, != 6.3.0, < 7" + source = "hashicorp/google-beta" + version = ">= 6.5.0, < 7" } kubernetes = { source = "hashicorp/kubernetes" diff --git a/modules/beta-private-cluster-update-variant/cluster.tf b/modules/beta-private-cluster-update-variant/cluster.tf index af766203d9..2b2fb297b0 100644 --- a/modules/beta-private-cluster-update-variant/cluster.tf +++ b/modules/beta-private-cluster-update-variant/cluster.tf @@ -255,6 +255,10 @@ resource "google_container_cluster" "primary" { disabled = !var.horizontal_pod_autoscaling } + gcp_filestore_csi_driver_config { + enabled = var.filestore_csi_driver + } + network_policy_config { disabled = !var.network_policy } @@ -263,10 +267,6 @@ resource "google_container_cluster" "primary" { enabled = var.dns_cache } - gcp_filestore_csi_driver_config { - enabled = var.filestore_csi_driver - } - dynamic "gce_persistent_disk_csi_driver_config" { for_each = local.cluster_gce_pd_csi_config diff --git a/modules/beta-private-cluster-update-variant/variables.tf b/modules/beta-private-cluster-update-variant/variables.tf index 12bf92a229..6facaf45d9 100644 --- a/modules/beta-private-cluster-update-variant/variables.tf +++ b/modules/beta-private-cluster-update-variant/variables.tf @@ -666,6 +666,12 @@ variable "enable_tpu" { default = false } +variable "filestore_csi_driver" { + type = bool + description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes" + default = false +} + variable "network_policy" { type = bool description = "Enable network policy addon" @@ -690,12 +696,6 @@ variable "remove_default_node_pool" { default = false } -variable "filestore_csi_driver" { - type = bool - description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes" - default = false -} - variable "disable_legacy_metadata_endpoints" { type = bool description = "Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated." diff --git a/modules/beta-private-cluster/cluster.tf b/modules/beta-private-cluster/cluster.tf index 6e5313b2d7..42eac444d1 100644 --- a/modules/beta-private-cluster/cluster.tf +++ b/modules/beta-private-cluster/cluster.tf @@ -255,6 +255,10 @@ resource "google_container_cluster" "primary" { disabled = !var.horizontal_pod_autoscaling } + gcp_filestore_csi_driver_config { + enabled = var.filestore_csi_driver + } + network_policy_config { disabled = !var.network_policy } @@ -263,10 +267,6 @@ resource "google_container_cluster" "primary" { enabled = var.dns_cache } - gcp_filestore_csi_driver_config { - enabled = var.filestore_csi_driver - } - dynamic "gce_persistent_disk_csi_driver_config" { for_each = local.cluster_gce_pd_csi_config diff --git a/modules/beta-private-cluster/variables.tf b/modules/beta-private-cluster/variables.tf index 12bf92a229..6facaf45d9 100644 --- a/modules/beta-private-cluster/variables.tf +++ b/modules/beta-private-cluster/variables.tf @@ -666,6 +666,12 @@ variable "enable_tpu" { default = false } +variable "filestore_csi_driver" { + type = bool + description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes" + default = false +} + variable "network_policy" { type = bool description = "Enable network policy addon" @@ -690,12 +696,6 @@ variable "remove_default_node_pool" { default = false } -variable "filestore_csi_driver" { - type = bool - description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes" - default = false -} - variable "disable_legacy_metadata_endpoints" { type = bool description = "Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated." diff --git a/modules/beta-public-cluster-update-variant/cluster.tf b/modules/beta-public-cluster-update-variant/cluster.tf index 708a350f4d..4f8822a9a9 100644 --- a/modules/beta-public-cluster-update-variant/cluster.tf +++ b/modules/beta-public-cluster-update-variant/cluster.tf @@ -255,6 +255,10 @@ resource "google_container_cluster" "primary" { disabled = !var.horizontal_pod_autoscaling } + gcp_filestore_csi_driver_config { + enabled = var.filestore_csi_driver + } + network_policy_config { disabled = !var.network_policy } @@ -263,10 +267,6 @@ resource "google_container_cluster" "primary" { enabled = var.dns_cache } - gcp_filestore_csi_driver_config { - enabled = var.filestore_csi_driver - } - dynamic "gce_persistent_disk_csi_driver_config" { for_each = local.cluster_gce_pd_csi_config diff --git a/modules/beta-public-cluster-update-variant/variables.tf b/modules/beta-public-cluster-update-variant/variables.tf index 499075e902..ed977c8e1a 100644 --- a/modules/beta-public-cluster-update-variant/variables.tf +++ b/modules/beta-public-cluster-update-variant/variables.tf @@ -630,6 +630,12 @@ variable "enable_tpu" { default = false } +variable "filestore_csi_driver" { + type = bool + description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes" + default = false +} + variable "network_policy" { type = bool description = "Enable network policy addon" @@ -654,12 +660,6 @@ variable "remove_default_node_pool" { default = false } -variable "filestore_csi_driver" { - type = bool - description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes" - default = false -} - variable "disable_legacy_metadata_endpoints" { type = bool description = "Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated." diff --git a/modules/beta-public-cluster/cluster.tf b/modules/beta-public-cluster/cluster.tf index c12791010c..38849100ff 100644 --- a/modules/beta-public-cluster/cluster.tf +++ b/modules/beta-public-cluster/cluster.tf @@ -255,6 +255,10 @@ resource "google_container_cluster" "primary" { disabled = !var.horizontal_pod_autoscaling } + gcp_filestore_csi_driver_config { + enabled = var.filestore_csi_driver + } + network_policy_config { disabled = !var.network_policy } @@ -263,10 +267,6 @@ resource "google_container_cluster" "primary" { enabled = var.dns_cache } - gcp_filestore_csi_driver_config { - enabled = var.filestore_csi_driver - } - dynamic "gce_persistent_disk_csi_driver_config" { for_each = local.cluster_gce_pd_csi_config diff --git a/modules/beta-public-cluster/variables.tf b/modules/beta-public-cluster/variables.tf index 499075e902..ed977c8e1a 100644 --- a/modules/beta-public-cluster/variables.tf +++ b/modules/beta-public-cluster/variables.tf @@ -630,6 +630,12 @@ variable "enable_tpu" { default = false } +variable "filestore_csi_driver" { + type = bool + description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes" + default = false +} + variable "network_policy" { type = bool description = "Enable network policy addon" @@ -654,12 +660,6 @@ variable "remove_default_node_pool" { default = false } -variable "filestore_csi_driver" { - type = bool - description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes" - default = false -} - variable "disable_legacy_metadata_endpoints" { type = bool description = "Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated." diff --git a/modules/private-cluster-update-variant/cluster.tf b/modules/private-cluster-update-variant/cluster.tf index d783db4227..19ffa4d669 100644 --- a/modules/private-cluster-update-variant/cluster.tf +++ b/modules/private-cluster-update-variant/cluster.tf @@ -234,6 +234,10 @@ resource "google_container_cluster" "primary" { disabled = !var.horizontal_pod_autoscaling } + gcp_filestore_csi_driver_config { + enabled = var.filestore_csi_driver + } + network_policy_config { disabled = !var.network_policy } @@ -242,10 +246,6 @@ resource "google_container_cluster" "primary" { enabled = var.dns_cache } - gcp_filestore_csi_driver_config { - enabled = var.filestore_csi_driver - } - dynamic "gce_persistent_disk_csi_driver_config" { for_each = local.cluster_gce_pd_csi_config diff --git a/modules/private-cluster-update-variant/variables.tf b/modules/private-cluster-update-variant/variables.tf index 70b2619e6c..c61dfae1f5 100644 --- a/modules/private-cluster-update-variant/variables.tf +++ b/modules/private-cluster-update-variant/variables.tf @@ -636,6 +636,12 @@ variable "enable_tpu" { default = false } +variable "filestore_csi_driver" { + type = bool + description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes" + default = false +} + variable "network_policy" { type = bool description = "Enable network policy addon" @@ -660,12 +666,6 @@ variable "remove_default_node_pool" { default = false } -variable "filestore_csi_driver" { - type = bool - description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes" - default = false -} - variable "disable_legacy_metadata_endpoints" { type = bool description = "Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated." diff --git a/modules/private-cluster/cluster.tf b/modules/private-cluster/cluster.tf index 5e892fe978..31d5f695af 100644 --- a/modules/private-cluster/cluster.tf +++ b/modules/private-cluster/cluster.tf @@ -234,6 +234,10 @@ resource "google_container_cluster" "primary" { disabled = !var.horizontal_pod_autoscaling } + gcp_filestore_csi_driver_config { + enabled = var.filestore_csi_driver + } + network_policy_config { disabled = !var.network_policy } @@ -242,10 +246,6 @@ resource "google_container_cluster" "primary" { enabled = var.dns_cache } - gcp_filestore_csi_driver_config { - enabled = var.filestore_csi_driver - } - dynamic "gce_persistent_disk_csi_driver_config" { for_each = local.cluster_gce_pd_csi_config diff --git a/modules/private-cluster/variables.tf b/modules/private-cluster/variables.tf index 70b2619e6c..c61dfae1f5 100644 --- a/modules/private-cluster/variables.tf +++ b/modules/private-cluster/variables.tf @@ -636,6 +636,12 @@ variable "enable_tpu" { default = false } +variable "filestore_csi_driver" { + type = bool + description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes" + default = false +} + variable "network_policy" { type = bool description = "Enable network policy addon" @@ -660,12 +666,6 @@ variable "remove_default_node_pool" { default = false } -variable "filestore_csi_driver" { - type = bool - description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes" - default = false -} - variable "disable_legacy_metadata_endpoints" { type = bool description = "Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated." diff --git a/variables.tf b/variables.tf index 7f6f1f2a38..dbcb47d1e2 100644 --- a/variables.tf +++ b/variables.tf @@ -600,6 +600,12 @@ variable "enable_tpu" { default = false } +variable "filestore_csi_driver" { + type = bool + description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes" + default = false +} + variable "network_policy" { type = bool description = "Enable network policy addon" @@ -624,12 +630,6 @@ variable "remove_default_node_pool" { default = false } -variable "filestore_csi_driver" { - type = bool - description = "The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes" - default = false -} - variable "disable_legacy_metadata_endpoints" { type = bool description = "Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated."