Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/infrastructure/infrastructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ terraform init && terraform apply -var-file=terraform.tfvars
| `system_node_pool_vm_size` | VM size for AKS system node pool | `Standard_D8ds_v5` |
| `system_node_pool_node_count` | Number of nodes for AKS system node pool | `1` |
| `system_node_pool_zones` | Availability zones for system node pool | `null` |
| `system_node_pool_enable_auto_scaling` | Enable auto-scaling for system node pool | `false` |
| `should_enable_system_node_pool_auto_scaling` | Enable auto-scaling for system node pool | `false` |
| `system_node_pool_min_count` | Minimum nodes when auto-scaling enabled | `null` |
| `system_node_pool_max_count` | Maximum nodes when auto-scaling enabled | `null` |

Expand Down
2 changes: 1 addition & 1 deletion infrastructure/examples/terraform.tfvars.prod
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ postgresql_high_availability = {
}

// Redis HA
redis_high_availability_enabled = true
should_enable_redis_high_availability = true

// Network Security — Full Private
should_enable_private_endpoint = true
Expand Down
18 changes: 9 additions & 9 deletions infrastructure/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ module "platform" {
redis_config = {
sku_name = var.redis_sku_name
clustering_policy = var.redis_clustering_policy
high_availability_enabled = var.redis_high_availability_enabled
high_availability_enabled = var.should_enable_redis_high_availability
}

// OSMO workload identity
Expand Down Expand Up @@ -167,14 +167,14 @@ module "sil" {

// AKS system node pool configuration
aks_config = {
system_node_pool_vm_size = var.system_node_pool_vm_size
system_node_pool_node_count = var.system_node_pool_node_count
system_node_pool_enable_auto_scaling = var.system_node_pool_enable_auto_scaling
system_node_pool_min_count = var.system_node_pool_min_count
system_node_pool_max_count = var.system_node_pool_max_count
is_private_cluster = var.should_enable_private_aks_cluster
system_node_pool_zones = var.system_node_pool_zones
should_enable_microsoft_defender = var.should_enable_microsoft_defender
system_node_pool_vm_size = var.system_node_pool_vm_size
system_node_pool_node_count = var.system_node_pool_node_count
should_enable_system_node_pool_auto_scaling = var.should_enable_system_node_pool_auto_scaling
system_node_pool_min_count = var.system_node_pool_min_count
system_node_pool_max_count = var.system_node_pool_max_count
is_private_cluster = var.should_enable_private_aks_cluster
system_node_pool_zones = var.system_node_pool_zones
should_enable_microsoft_defender = var.should_enable_microsoft_defender
}

node_pools = var.node_pools
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/terraform/modules/automation/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ locals {
location = coalesce(var.location, var.resource_group.location)

# Construct schedule start_time: tomorrow at the configured time (RFC3339 format)
tomorrow_date = formatdate("YYYY-MM-DD", timeadd(timestamp(), "24h"))
tomorrow_date = formatdate("YYYY-MM-DD", timeadd(plantimestamp(), "24h"))
schedule_time = "${local.tomorrow_date}T${var.schedule_config.start_time}:00+00:00"
}

Expand Down
8 changes: 4 additions & 4 deletions infrastructure/terraform/modules/sil/aks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ resource "azurerm_kubernetes_cluster" "main" {
default_node_pool {
name = "system"
vm_size = var.aks_config.system_node_pool_vm_size
node_count = var.aks_config.system_node_pool_enable_auto_scaling ? null : var.aks_config.system_node_pool_node_count
auto_scaling_enabled = var.aks_config.system_node_pool_enable_auto_scaling
min_count = var.aks_config.system_node_pool_enable_auto_scaling ? var.aks_config.system_node_pool_min_count : null
max_count = var.aks_config.system_node_pool_enable_auto_scaling ? var.aks_config.system_node_pool_max_count : null
node_count = var.aks_config.should_enable_system_node_pool_auto_scaling ? null : var.aks_config.system_node_pool_node_count
auto_scaling_enabled = var.aks_config.should_enable_system_node_pool_auto_scaling
min_count = var.aks_config.should_enable_system_node_pool_auto_scaling ? var.aks_config.system_node_pool_min_count : null
max_count = var.aks_config.should_enable_system_node_pool_auto_scaling ? var.aks_config.system_node_pool_max_count : null
vnet_subnet_id = azurerm_subnet.aks.id
os_disk_size_gb = 128
os_disk_type = "Ephemeral"
Expand Down
30 changes: 15 additions & 15 deletions infrastructure/terraform/modules/sil/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,24 +59,24 @@ variable "aks_subnet_config" {

variable "aks_config" {
type = object({
system_node_pool_vm_size = string
system_node_pool_node_count = number
system_node_pool_enable_auto_scaling = bool
system_node_pool_min_count = optional(number)
system_node_pool_max_count = optional(number)
is_private_cluster = bool
system_node_pool_zones = optional(list(string))
should_enable_microsoft_defender = optional(bool, false)
system_node_pool_vm_size = string
system_node_pool_node_count = number
should_enable_system_node_pool_auto_scaling = bool
system_node_pool_min_count = optional(number)
system_node_pool_max_count = optional(number)
is_private_cluster = bool
system_node_pool_zones = optional(list(string))
should_enable_microsoft_defender = optional(bool, false)
})
description = "AKS cluster configuration for the system node pool"
default = {
system_node_pool_vm_size = "Standard_D8ds_v5"
system_node_pool_node_count = 2
system_node_pool_enable_auto_scaling = false
system_node_pool_min_count = null
system_node_pool_max_count = null
is_private_cluster = true
system_node_pool_zones = null
system_node_pool_vm_size = "Standard_D8ds_v5"
system_node_pool_node_count = 2
should_enable_system_node_pool_auto_scaling = false
system_node_pool_min_count = null
system_node_pool_max_count = null
is_private_cluster = true
system_node_pool_zones = null
}
}

Expand Down
4 changes: 2 additions & 2 deletions infrastructure/terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ variable "redis_clustering_policy" {
}
}

variable "redis_high_availability_enabled" {
variable "should_enable_redis_high_availability" {
type = bool
description = "Enable high availability for Redis. Increases cost but provides zone redundancy"
default = false
Expand Down Expand Up @@ -257,7 +257,7 @@ variable "system_node_pool_node_count" {
default = 1
}

variable "system_node_pool_enable_auto_scaling" {
variable "should_enable_system_node_pool_auto_scaling" {
type = bool
description = "Enable auto-scaling for the AKS system node pool"
default = false
Expand Down
Loading