Skip to content

Commit

Permalink
No pdcsi disable on create
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcary committed Dec 1, 2023
1 parent 61f0388 commit 4e6a7ca
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down

0 comments on commit 4e6a7ca

Please sign in to comment.