Skip to content

Commit

Permalink
Added maintenance window for prod postgress
Browse files Browse the repository at this point in the history
- Configured the maintenance window to occur on Sunday at 2 AM when there is minimal application traffic. This ensures that any necessary updates or maintenance tasks are performed during a low-traffic period, minimizing impact on users.
  • Loading branch information
VenkataChalla554 committed Jul 9, 2024
1 parent 64efb9d commit 23a40b2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions terraform/application/config/production/variables.tfvars.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"app_environment": "production",
"app_replicas": 2,
"azure_maintenance_window": {
"day_of_week": 0,
"start_hour": 2,
"start_minute": 0
},
"cluster": "production",
"dqt_api_url": "https://teacher-qualifications-api.education.gov.uk",
"enable_logit": true,
Expand Down
2 changes: 2 additions & 0 deletions terraform/application/databases.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ module "postgres" {
use_azure = var.deploy_azure_backing_services
azure_enable_monitoring = var.enable_monitoring
azure_extensions = ["pg_stat_statements", "pgcrypto"]

azure_maintenance_window = var.azure_maintenance_window
}
9 changes: 9 additions & 0 deletions terraform/application/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ variable "azure_resource_prefix" {
type = string
}

variable "azure_maintenance_window" {
type = object({
day_of_week = number
start_hour = number
start_minute = number
})
default = null
}

variable "azure_sp_credentials_json" {
type = string
default = null
Expand Down

0 comments on commit 23a40b2

Please sign in to comment.