diff --git a/modules/gke-cluster-autopilot/main.tf b/modules/gke-cluster-autopilot/main.tf index d401a9752e..825c8739e5 100644 --- a/modules/gke-cluster-autopilot/main.tf +++ b/modules/gke-cluster-autopilot/main.tf @@ -177,6 +177,12 @@ resource "google_container_cluster" "cluster" { exclusion_name = exclusion.value.name start_time = exclusion.value.start_time end_time = exclusion.value.end_time + dynamic "exclusion_options" { + for_each = exclusion.value.scope != null ? [""] : [] + content { + scope = exclusion.value.scope + } + } } } } diff --git a/modules/gke-cluster-standard/main.tf b/modules/gke-cluster-standard/main.tf index 47998a6335..6ab4c9d881 100644 --- a/modules/gke-cluster-standard/main.tf +++ b/modules/gke-cluster-standard/main.tf @@ -338,6 +338,12 @@ resource "google_container_cluster" "cluster" { exclusion_name = exclusion.value.name start_time = exclusion.value.start_time end_time = exclusion.value.end_time + dynamic "exclusion_options" { + for_each = exclusion.value.scope != null ? [""] : [] + content { + scope = exclusion.value.scope + } + } } } }