GoogleCloudPlatform/gcs-fuse-csi-driver

Cannot create an Autopilot cluster with the CSI driver enabled using terraform

songjiaxun opened this issue · 0 comments

Symptom

When create an Autopilot cluster with the CSI driver enabled using terraform, you will get the following error:

│ Error: Conflicting configuration arguments
│ 
│   with module.cluster.google_container_cluster.cluster,
│   on ../../../DH9514_thdgit/tf-mod-gke-cluster/main.tf line 44, in resource "google_container_cluster" "cluster":
│   44:     gcs_fuse_csi_driver_config {
│ 
│ "addons_config.0.gcs_fuse_csi_driver_config": conflicts with enable_autopilot

See hashicorp/terraform-provider-google#15817 for details.

Workaround

You can create an Autopilot cluster with the CSI driver disabled, and then run the additional step below to enable CSI driver.

gcloud container clusters update ${CLUSTER} --update-addons GcsFuseCsiDriver=ENABLED --region=${REGION}

Fix

This PR GoogleCloudPlatform/magic-modules#8998 will fix the issue.