diff --git a/mmv1/third_party/terraform/services/container/resource_container_cluster.go.tmpl b/mmv1/third_party/terraform/services/container/resource_container_cluster.go.tmpl index 0d759da387d9..11ec2ae1880d 100644 --- a/mmv1/third_party/terraform/services/container/resource_container_cluster.go.tmpl +++ b/mmv1/third_party/terraform/services/container/resource_container_cluster.go.tmpl @@ -90,6 +90,7 @@ var ( "addons_config.0.gcs_fuse_csi_driver_config", "addons_config.0.stateful_ha_config", "addons_config.0.ray_operator_config", + "addons_config.0.parallelstore_csi_driver_config", {{- if ne $.TargetVersionName "ga" }} "addons_config.0.istio_config", "addons_config.0.kalm_config", @@ -437,6 +438,22 @@ func ResourceContainerCluster() *schema.Resource { }, }, }, + "parallelstore_csi_driver_config": { + Type: schema.TypeList, + Optional: true, + Computed: true, + AtLeastOneOf: addonsConfigKeys, + MaxItems: 1, + Description: `The status of the Parallelstore CSI driver addon, which allows the usage of Parallelstore instances as volumes. Defaults to disabled; set enabled = true to enable.`, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "enabled": { + Type: schema.TypeBool, + Required: true, + }, + }, + }, + }, {{- if ne $.TargetVersionName "ga" }} "istio_config": { Type: schema.TypeList, @@ -4758,6 +4775,14 @@ func expandClusterAddonsConfig(configured interface{}) *container.AddonsConfig { } } + if v, ok := config["parallelstore_csi_driver_config"]; ok && len(v.([]interface{})) > 0 { + addon := v.([]interface{})[0].(map[string]interface{}) + ac.ParallelstoreCsiDriverConfig = &container.ParallelstoreCsiDriverConfig{ + Enabled: addon["enabled"].(bool), + ForceSendFields: []string{"Enabled"}, + } + } + {{ if ne $.TargetVersionName `ga` -}} if v, ok := config["istio_config"]; ok && len(v.([]interface{})) > 0 { addon := v.([]interface{})[0].(map[string]interface{}) @@ -5993,6 +6018,13 @@ func flattenClusterAddonsConfig(c *container.AddonsConfig) []map[string]interfac {{"}}"}} } } + if c.ParallelstoreCsiDriverConfig != nil { + result["parallelstore_csi_driver_config"] = []map[string]interface{}{ + { + "enabled": c.ParallelstoreCsiDriverConfig.Enabled, + }, + } + } {{ if ne $.TargetVersionName `ga` -}} if c.IstioConfig != nil { diff --git a/mmv1/third_party/terraform/services/container/resource_container_cluster_test.go.tmpl b/mmv1/third_party/terraform/services/container/resource_container_cluster_test.go.tmpl index 023af48758d7..df42af195bf3 100644 --- a/mmv1/third_party/terraform/services/container/resource_container_cluster_test.go.tmpl +++ b/mmv1/third_party/terraform/services/container/resource_container_cluster_test.go.tmpl @@ -6111,6 +6111,9 @@ resource "google_container_cluster" "primary" { ray_operator_config { enabled = false } + parallelstore_csi_driver_config { + enabled = false + } {{- if ne $.TargetVersionName "ga" }} istio_config { disabled = true @@ -6191,6 +6194,9 @@ resource "google_container_cluster" "primary" { enabled = true } } + parallelstore_csi_driver_config { + enabled = true + } {{- if ne $.TargetVersionName "ga" }} istio_config { disabled = false diff --git a/mmv1/third_party/terraform/website/docs/r/container_cluster.html.markdown b/mmv1/third_party/terraform/website/docs/r/container_cluster.html.markdown index cb9e51a02ddd..0d22b8d38749 100644 --- a/mmv1/third_party/terraform/website/docs/r/container_cluster.html.markdown +++ b/mmv1/third_party/terraform/website/docs/r/container_cluster.html.markdown @@ -481,6 +481,11 @@ Fleet configuration for the cluster. Structure is [documented below](#nested_fle GKE](https://cloud.google.com/kubernetes-engine/docs/add-on/ray-on-gke/how-to/collect-view-logs-metrics) for more information. +* `parallelstore_csi_driver_config` - (Optional) The status of the Parallelstore CSI driver addon, + which allows the usage of a Parallelstore instances as volumes. + It is disabled by default for Standard clusters; set `enabled = true` to enable. + It is enabled by default for Autopilot clusters with version 1.29 or later; set `enabled = true` to enable it explicitly. + See [Enable the Parallelstore CSI driver](https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/parallelstore-csi-new-volume#enable) for more information. This example `addons_config` disables two addons: