Skip to content

Commit 38238ff

Browse files
committed
add windows_profile support
1 parent be56dbf commit 38238ff

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@ No modules.
432432
| <a name="input_upgrade_override"></a> [upgrade\_override](#input\_upgrade\_override) | `force_upgrade_enabled` - (Required) Whether to force upgrade the cluster. Possible values are `true` or `false`.<br/>`effective_until` - (Optional) Specifies the duration, in RFC 3339 format (e.g., `2025-10-01T13:00:00Z`), the upgrade\_override values are effective. This field must be set for the `upgrade_override` values to take effect. The date-time must be within the next 30 days. | <pre>object({<br/> force_upgrade_enabled = bool<br/> effective_until = optional(string)<br/> })</pre> | `null` | no |
433433
| <a name="input_vnet_subnet"></a> [vnet\_subnet](#input\_vnet\_subnet) | object({<br/> id = The ID of a Subnet where the Kubernetes Node Pool should exist. Changing this forces a new resource to be created.<br/>}) | <pre>object({<br/> id = string<br/> })</pre> | `null` | no |
434434
| <a name="input_web_app_routing"></a> [web\_app\_routing](#input\_web\_app\_routing) | object({<br/> dns\_zone\_ids = "(Required) Specifies the list of the DNS Zone IDs in which DNS entries are created for applications deployed to the cluster when Web App Routing is enabled. If not using Bring-Your-Own DNS zones this property should be set to an empty list."<br/>}) | <pre>object({<br/> dns_zone_ids = list(string)<br/> })</pre> | `null` | no |
435+
| <a name="input_windows_profile"></a> [windows\_profile](#input\_windows\_profile) | (Optional) The Windows profile for the AKS cluster. Required when `os_type` is set to `Windows` in any node pool.<br/>object({<br/> admin\_username = "(Required) The Admin Username for Windows VMs. Changing this forces a new resource to be created."<br/> admin\_password = "(Required) The Admin Password for Windows VMs. Length must be between 14 and 123 characters."<br/>}) | <pre>object({<br/> admin_password = string<br/> admin_username = string<br/> })</pre> | `null` | no |
435436
| <a name="input_workload_autoscaler_profile"></a> [workload\_autoscaler\_profile](#input\_workload\_autoscaler\_profile) | `keda_enabled` - (Optional) Specifies whether KEDA Autoscaler can be used for workloads.<br/>`vertical_pod_autoscaler_enabled` - (Optional) Specifies whether Vertical Pod Autoscaler should be enabled. | <pre>object({<br/> keda_enabled = optional(bool, false)<br/> vertical_pod_autoscaler_enabled = optional(bool, false)<br/> })</pre> | `null` | no |
436437
| <a name="input_workload_identity_enabled"></a> [workload\_identity\_enabled](#input\_workload\_identity\_enabled) | Enable or Disable Workload Identity. Defaults to false. | `bool` | `false` | no |
437438

main.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,16 @@ resource "azurerm_kubernetes_cluster" "main" {
552552
dns_zone_ids = var.web_app_routing.dns_zone_ids
553553
}
554554
}
555+
556+
dynamic "windows_profile" {
557+
for_each = var.windows_profile != null ? ["windows_profile"] : []
558+
559+
content {
560+
admin_username = var.windows_profile.admin_username
561+
admin_password = var.windows_profile.admin_password
562+
}
563+
}
564+
555565
dynamic "workload_autoscaler_profile" {
556566
for_each = var.workload_autoscaler_profile == null ? [] : [var.workload_autoscaler_profile]
557567

variables.tf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,6 +1545,22 @@ variable "web_app_routing" {
15451545
EOT
15461546
}
15471547

1548+
variable "windows_profile" {
1549+
type = object({
1550+
admin_password = string
1551+
admin_username = string
1552+
})
1553+
default = null
1554+
sensitive = true
1555+
description = <<-EOT
1556+
(Optional) The Windows profile for the AKS cluster. Required when `os_type` is set to `Windows` in any node pool.
1557+
object({
1558+
admin_username = "(Required) The Admin Username for Windows VMs. Changing this forces a new resource to be created."
1559+
admin_password = "(Required) The Admin Password for Windows VMs. Length must be between 14 and 123 characters."
1560+
})
1561+
EOT
1562+
}
1563+
15481564
variable "workload_autoscaler_profile" {
15491565
type = object({
15501566
keda_enabled = optional(bool, false)

0 commit comments

Comments
 (0)