From 8487fe07422467bf578c5738baf9b1bd1fb9c876 Mon Sep 17 00:00:00 2001 From: halprin Date: Wed, 23 Oct 2024 10:24:54 -0600 Subject: [PATCH 1/3] Add a specific maintenance window for the database --- operations/template/db.tf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/operations/template/db.tf b/operations/template/db.tf index 456817506..724c543d2 100644 --- a/operations/template/db.tf +++ b/operations/template/db.tf @@ -22,6 +22,12 @@ resource "azurerm_postgresql_flexible_server" "database" { tenant_id = data.azurerm_client_config.current.tenant_id } + maintenance_window { # Sunday at 5:00 AM UTC which is 0:00 AM EST or 1:00 AM EDT + day_of_week = 0 + start_hour = 5 + start_minute = 0 + } + depends_on = [azurerm_private_dns_zone_virtual_network_link.db_network_link] lifecycle { From 15f473883e558f1f12a7572ed2aae03a35d56a42 Mon Sep 17 00:00:00 2001 From: halprin Date: Wed, 23 Oct 2024 10:58:36 -0600 Subject: [PATCH 2/3] Move DB maintenance window to our SLA maintenance window --- operations/template/db.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operations/template/db.tf b/operations/template/db.tf index 724c543d2..6dcd40aee 100644 --- a/operations/template/db.tf +++ b/operations/template/db.tf @@ -22,7 +22,7 @@ resource "azurerm_postgresql_flexible_server" "database" { tenant_id = data.azurerm_client_config.current.tenant_id } - maintenance_window { # Sunday at 5:00 AM UTC which is 0:00 AM EST or 1:00 AM EDT + maintenance_window { # Sunday at 12:00 UTC which is 7:00 AM EST or 8:00 AM EDT (around the time of our SLA's maintenance window) day_of_week = 0 start_hour = 5 start_minute = 0 From 80ec9d301663cb283600fdd85b09750972b5b17f Mon Sep 17 00:00:00 2001 From: halprin Date: Wed, 23 Oct 2024 11:03:25 -0600 Subject: [PATCH 3/3] Actually start the maintenance window at 12 UTC --- operations/template/db.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operations/template/db.tf b/operations/template/db.tf index 6dcd40aee..d93844836 100644 --- a/operations/template/db.tf +++ b/operations/template/db.tf @@ -24,7 +24,7 @@ resource "azurerm_postgresql_flexible_server" "database" { maintenance_window { # Sunday at 12:00 UTC which is 7:00 AM EST or 8:00 AM EDT (around the time of our SLA's maintenance window) day_of_week = 0 - start_hour = 5 + start_hour = 12 start_minute = 0 }