diff --git a/aks.tf b/aks.tf index b838156..b96b57d 100644 --- a/aks.tf +++ b/aks.tf @@ -40,6 +40,7 @@ resource "azurerm_kubernetes_cluster" "main" { only_critical_addons_enabled = local.node_default_pool.only_critical_addons_enabled os_disk_size_gb = local.node_default_pool.os_disk_size_gb os_disk_type = local.node_default_pool.os_disk_type + os_sku = local.node_default_pool.os_sku tags = local.tags vm_size = local.node_default_pool.vm_size vnet_subnet_id = local.subnet_id @@ -74,6 +75,7 @@ resource "azurerm_kubernetes_cluster_node_pool" "user" { node_taints = local.node_user_pool_merged.node_taints os_disk_size_gb = local.node_user_pool.os_disk_size_gb os_disk_type = local.node_user_pool.os_disk_type + os_sku = local.node_user_pool.os_sku os_type = local.node_user_pool.os_type priority = local.node_user_pool.priority eviction_policy = local.node_user_pool.priority == "Spot" ? local.node_user_pool.eviction_policy : null diff --git a/test/main.tf b/test/main.tf index e8f7044..d3ee646 100644 --- a/test/main.tf +++ b/test/main.tf @@ -99,7 +99,7 @@ module "aks" { node_user_pool = { min_count = 1 node_count = 1 - os_type = "Linux" + os_type = "Windows" } oms = { enabled = true diff --git a/variables.tf b/variables.tf index 7dff706..5858dad 100644 --- a/variables.tf +++ b/variables.tf @@ -43,6 +43,7 @@ variable "node_default_pool" { only_critical_addons_enabled = optional(bool, true) os_disk_size_gb = optional(number, 70) os_disk_type = optional(string, "Ephemeral") + os_sku = optional(string, null) vm_size = optional(string, "Standard_D2ds_v5") }) description = "node default system pool for aks" @@ -61,9 +62,10 @@ variable "node_user_pool" { node_count = optional(number, 2) node_labels = optional(map(any), {}) # needs defaults as we merge it later node_taints = optional(list(string), []) # needs defaults as we concat it later - os_type = optional(string, "Linux") os_disk_size_gb = optional(number, 120) os_disk_type = optional(string, "Ephemeral") + os_sku = optional(string, null) + os_type = optional(string, "Linux") priority = optional(string, "Regular") spot_max_price = optional(number, -1) vm_size = optional(string, "Standard_D4ds_v5")