Skip to content

Commit

Permalink
Merge pull request #708 from GoogleCloudPlatform/gke/autopilot-issue-705
Browse files Browse the repository at this point in the history
Fix #705
  • Loading branch information
juliocc authored Jun 28, 2022
2 parents 85081bd + add8fa5 commit aa9b01c
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 aa9b01c

Please sign in to comment.