Skip to content

Commit

Permalink
Added required attributes to postgres and redis
Browse files Browse the repository at this point in the history
WHY: There is a required minimum standard setting for prod postgres and redis
HOW: By setting HA, Maintenance window and SKU
  • Loading branch information
temitope777 committed Apr 30, 2024
1 parent 3a1e8be commit 4685142
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions terraform/aks/databases.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ module "postgres" {
server_version = "14"

azure_enable_backup_storage = var.azure_enable_backup_storage

azure_sku_name = var.postgres_flexible_server_sku
azure_enable_high_availability = var.postgres_enable_high_availability
azure_maintenance_window = var.azure_maintenance_window
}

module "redis" {
Expand All @@ -34,4 +38,5 @@ module "redis" {
use_azure = var.deploy_azure_backing_services
azure_enable_monitoring = var.enable_monitoring
azure_patch_schedule = [{ "day_of_week" : "Sunday", "start_hour_utc" : 01 }]
azure_maxmemory_policy = "noeviction"
}
9 changes: 9 additions & 0 deletions terraform/aks/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ variable "enable_monitoring" {
default = false
description = "Enable monitoring and alerting"
}
variable "postgres_enable_high_availability" {
default = false
}
variable "postgres_flexible_server_sku" {
default = "B_Standard_B1ms"
}
variable "azure_maintenance_window" {
default = null
}

variable "enable_postgres_ssl" {
default = true
Expand Down
7 changes: 7 additions & 0 deletions terraform/aks/workspace_variables/production.tfvars.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
"config_short": "pd",
"service_short": "faltrn",
"app_key_vault": "s189p01-faltrn-pd-app-kv",
"postgres_flexible_server_sku": "GP_Standard_D2ds_v4",
"postgres_enable_high_availability": true,
"azure_maintenance_window": {
"day_of_week": 0,
"start_hour": 3,
"start_minute": 0
},
"statuscake_alerts": {
"alert": {
"website_url": [
Expand Down

0 comments on commit 4685142

Please sign in to comment.