Skip to content

Commit

Permalink
as developed with Julio
Browse files Browse the repository at this point in the history
  • Loading branch information
ludoo authored and juliocc committed Jun 28, 2022
1 parent 66c4fff commit 5982fe8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/gke-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ resource "google_container_cluster" "cluster" {
auth = var.addons.istio_config.tls ? "AUTH_MUTUAL_TLS" : "AUTH_NONE"
}
gce_persistent_disk_csi_driver_config {
enabled = var.addons.gce_persistent_disk_csi_driver_config
enabled = var.enable_autopilot || var.addons.gce_persistent_disk_csi_driver_config
}
dynamic "gcp_filestore_csi_driver_config" {
# Pass the user-provided value when autopilot is disabled. When
# autopilot is enabled, pass the value only when the addon is
# set to true. This will fail but warns the user that autopilot
# doesn't support this option, instead of silently discarding
# and hiding the error
for_each = !var.enable_autopilot || (var.enable_autopilot && var.addons.gcp_filestore_csi_driver_config) ? [""] : []
for_each = var.enable_autopilot && !var.addons.gcp_filestore_csi_driver_config ? [] : [""]
content {
enabled = var.addons.gcp_filestore_csi_driver_config
}
Expand Down

0 comments on commit 5982fe8

Please sign in to comment.