Skip to content

Commit db799b6

Browse files
author
Dmytro Bondar
authored
Add support for workload_autoscaler_profile settings (#404)
* Add support for workload_autoscaler_profile settings
1 parent 3e1f508 commit db799b6

4 files changed

Lines changed: 24 additions & 3 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ The following sections are generated by [terraform-docs](https://github.com/terr
211211
|------|---------|
212212
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
213213
| <a name="requirement_azapi"></a> [azapi](#requirement\_azapi) | >= 1.4.0, < 2.0 |
214-
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | >= 3.69.0, < 4.0 |
214+
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | >= 3.80.0, < 4.0 |
215215
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 3.0 |
216216
| <a name="requirement_tls"></a> [tls](#requirement\_tls) | >= 3.1 |
217217

@@ -220,7 +220,7 @@ The following sections are generated by [terraform-docs](https://github.com/terr
220220
| Name | Version |
221221
|------|---------|
222222
| <a name="provider_azapi"></a> [azapi](#provider\_azapi) | >= 1.4.0, < 2.0 |
223-
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | >= 3.69.0, < 4.0 |
223+
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | >= 3.80.0, < 4.0 |
224224
| <a name="provider_null"></a> [null](#provider\_null) | >= 3.0 |
225225
| <a name="provider_tls"></a> [tls](#provider\_tls) | >= 3.1 |
226226

@@ -395,6 +395,7 @@ No modules.
395395
| <a name="input_ultra_ssd_enabled"></a> [ultra\_ssd\_enabled](#input\_ultra\_ssd\_enabled) | (Optional) Used to specify whether the UltraSSD is enabled in the Default Node Pool. Defaults to false. | `bool` | `false` | no |
396396
| <a name="input_vnet_subnet_id"></a> [vnet\_subnet\_id](#input\_vnet\_subnet\_id) | (Optional) The ID of a Subnet where the Kubernetes Node Pool should exist. Changing this forces a new resource to be created. | `string` | `null` | no |
397397
| <a name="input_web_app_routing"></a> [web\_app\_routing](#input\_web\_app\_routing) | object({<br> dns\_zone\_id = "(Required) Specifies the ID of the DNS Zone in which DNS entries are created for applications deployed to the cluster when Web App Routing is enabled."<br>}) | <pre>object({<br> dns_zone_id = string<br> })</pre> | `null` | no |
398+
| <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 |
398399
| <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 |
399400

400401
## Outputs

main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,14 @@ resource "azurerm_kubernetes_cluster" "main" {
493493
dns_zone_id = var.web_app_routing.dns_zone_id
494494
}
495495
}
496+
dynamic "workload_autoscaler_profile" {
497+
for_each = var.workload_autoscaler_profile == null ? [] : [var.workload_autoscaler_profile]
498+
499+
content {
500+
keda_enabled = workload_autoscaler_profile.value.keda_enabled
501+
vertical_pod_autoscaler_enabled = workload_autoscaler_profile.value.vertical_pod_autoscaler_enabled
502+
}
503+
}
496504

497505
lifecycle {
498506
ignore_changes = [kubernetes_version]

variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,6 +1285,18 @@ variable "web_app_routing" {
12851285
EOT
12861286
}
12871287

1288+
variable "workload_autoscaler_profile" {
1289+
type = object({
1290+
keda_enabled = optional(bool, false)
1291+
vertical_pod_autoscaler_enabled = optional(bool, false)
1292+
})
1293+
default = null
1294+
description = <<-EOT
1295+
`keda_enabled` - (Optional) Specifies whether KEDA Autoscaler can be used for workloads.
1296+
`vertical_pod_autoscaler_enabled` - (Optional) Specifies whether Vertical Pod Autoscaler should be enabled.
1297+
EOT
1298+
}
1299+
12881300
variable "workload_identity_enabled" {
12891301
type = bool
12901302
default = false

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ terraform {
88
}
99
azurerm = {
1010
source = "hashicorp/azurerm"
11-
version = ">= 3.69.0, < 4.0"
11+
version = ">= 3.80.0, < 4.0"
1212
}
1313
null = {
1414
source = "hashicorp/null"

0 commit comments

Comments
 (0)