From 32e066d0410b99d4877df8e9ebc009cdd9812e52 Mon Sep 17 00:00:00 2001 From: Kurtser Alex Date: Sun, 11 Jul 2021 12:21:20 +0300 Subject: [PATCH] SGA-999 switching to reccurence maint window --- modules/private-cluster/cluster.tf | 4 +++- modules/private-cluster/variables.tf | 16 ++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/modules/private-cluster/cluster.tf b/modules/private-cluster/cluster.tf index fe34533714..56d3473330 100644 --- a/modules/private-cluster/cluster.tf +++ b/modules/private-cluster/cluster.tf @@ -118,8 +118,10 @@ resource "google_container_cluster" "primary" { } maintenance_policy { - daily_maintenance_window { + recurring_window { start_time = var.maintenance_start_time + end_time = var.maintenance_end_time + recurrence = var.maintenance_recurrence } } diff --git a/modules/private-cluster/variables.tf b/modules/private-cluster/variables.tf index a299d887f3..5dbb504c48 100644 --- a/modules/private-cluster/variables.tf +++ b/modules/private-cluster/variables.tf @@ -110,8 +110,20 @@ variable "network_policy_provider" { variable "maintenance_start_time" { type = string - description = "Time window specified for daily or recurring maintenance operations in RFC3339 format" - default = "05:00" + description = "Start time for maintenance operations in RFC3339 format" + default = "06:00" +} + +variable "maintenance_end_time" { + type = string + description = "End time for maintenance operations in RFC3339 format" + default = "18:00" +} + +variable "maintenance_recurrence" { + type = string + description = "Maintenance recurrence scheduler" + default = "FREQ=WEEKLY;BYDAY=SU" } variable "maintenance_exclusions" {