Skip to content

Commit

Permalink
Fix setting default maintenance exclusion in GKE
Browse files Browse the repository at this point in the history
  • Loading branch information
karagieseking committed Dec 9, 2024
1 parent c18de94 commit b1cb0e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion google/_modules/gke/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ resource "google_container_cluster" "current" {
}

dynamic "maintenance_exclusion" {
for_each = var.maintenance_exclusion_start_time != null ? [1] : []
for_each = var.maintenance_exclusion_start_time != "" ? [1] : []

content {
start_time = var.maintenance_exclusion_start_time
Expand Down
8 changes: 4 additions & 4 deletions google/cluster/configuration.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ locals {
"03:00",
)

cluster_maintenance_exclusion_start_time = lookup(local.cfg, "cluster_maintenance_exclusion_start_time", "")
cluster_maintenance_exclusion_end_time = lookup(local.cfg, "cluster_maintenance_exclusion_end_time", "")
cluster_maintenance_exclusion_name = lookup(local.cfg, "cluster_maintenance_exclusion_name", "")
cluster_maintenance_exclusion_scope = lookup(local.cfg, "cluster_maintenance_exclusion_scope", "")
cluster_maintenance_exclusion_start_time = lookup(local.cfg, "cluster_maintenance_exclusion_start_time", null)
cluster_maintenance_exclusion_end_time = lookup(local.cfg, "cluster_maintenance_exclusion_end_time", null)
cluster_maintenance_exclusion_name = lookup(local.cfg, "cluster_maintenance_exclusion_name", null)
cluster_maintenance_exclusion_scope = lookup(local.cfg, "cluster_maintenance_exclusion_scope", null)

remove_default_node_pool = lookup(local.cfg, "remove_default_node_pool", true)

Expand Down

0 comments on commit b1cb0e6

Please sign in to comment.