diff --git a/mmv1/third_party/terraform/services/container/resource_container_cluster.go.erb b/mmv1/third_party/terraform/services/container/resource_container_cluster.go.erb index 58ea973c8eda..e1b9abe7c13d 100644 --- a/mmv1/third_party/terraform/services/container/resource_container_cluster.go.erb +++ b/mmv1/third_party/terraform/services/container/resource_container_cluster.go.erb @@ -2391,6 +2391,14 @@ func resourceContainerClusterCreate(d *schema.ResourceData, meta interface{}) er cluster.PrivateClusterConfig.EnablePrivateEndpoint = false } + // GcePersistentDiskCsiDriver cannot be disabled at cluster create, only on cluster update. + if cluster.AddonsConfig != nil && cluster.AddonsConfig.GcePersistentDiskCsiDriverConfig != nil { + enableGcePersistentDiskCsiDriver := cluster.AddonsConfig.GcePersistentDiskCsiDriverConfig.Enabled + if !enableGcePersistentDiskCsiDriver { + cluster.AddonsConfig.GcePersistentDiskCsiDriverConfig.Enabled = true + } + } + req := &container.CreateClusterRequest{ Cluster: cluster, }