Skip to content

Commit 1b1de8d

Browse files
committed
as developed with Julio
1 parent 3863e50 commit 1b1de8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/gke-cluster/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,15 @@ resource "google_container_cluster" "cluster" {
9090
auth = var.addons.istio_config.tls ? "AUTH_MUTUAL_TLS" : "AUTH_NONE"
9191
}
9292
gce_persistent_disk_csi_driver_config {
93-
enabled = var.addons.gce_persistent_disk_csi_driver_config
93+
enabled = var.enable_autopilot || var.addons.gce_persistent_disk_csi_driver_config
9494
}
9595
dynamic "gcp_filestore_csi_driver_config" {
9696
# Pass the user-provided value when autopilot is disabled. When
9797
# autopilot is enabled, pass the value only when the addon is
9898
# set to true. This will fail but warns the user that autopilot
9999
# doesn't support this option, instead of silently discarding
100100
# and hiding the error
101-
for_each = !var.enable_autopilot || (var.enable_autopilot && var.addons.gcp_filestore_csi_driver_config) ? [""] : []
101+
for_each = var.enable_autopilot && !var.addons.gcp_filestore_csi_driver_config ? [] : [""]
102102
content {
103103
enabled = var.addons.gcp_filestore_csi_driver_config
104104
}

0 commit comments

Comments
 (0)