Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incompatibility between backup and autopilot in GKE module #708

Merged
merged 2 commits into from
Jun 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/gke-cluster/main.tf
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