diff --git a/README.md b/README.md index 37309d4a..d424dcf5 100644 --- a/README.md +++ b/README.md @@ -396,6 +396,7 @@ No modules. | [storage\_profile\_enabled](#input\_storage\_profile\_enabled) | Enable storage profile | `bool` | `false` | no | | [storage\_profile\_file\_driver\_enabled](#input\_storage\_profile\_file\_driver\_enabled) | (Optional) Is the File CSI driver enabled? Defaults to `true` | `bool` | `true` | no | | [storage\_profile\_snapshot\_controller\_enabled](#input\_storage\_profile\_snapshot\_controller\_enabled) | (Optional) Is the Snapshot Controller enabled? Defaults to `true` | `bool` | `true` | no | +| [support\_plan](#input\_support\_plan) | The support plan which should be used for this Kubernetes Cluster. Possible values are `KubernetesOfficial` and `AKSLongTermSupport`. | `string` | `"KubernetesOfficial"` | no | | [tags](#input\_tags) | Any tags that should be present on the AKS cluster resources | `map(string)` | `{}` | no | | [temporary\_name\_for\_rotation](#input\_temporary\_name\_for\_rotation) | (Optional) Specifies the name of the temporary node pool used to cycle the default node pool for VM resizing. the `var.agents_size` is no longer ForceNew and can be resized by specifying `temporary_name_for_rotation` | `string` | `null` | no | | [tracing\_tags\_enabled](#input\_tracing\_tags\_enabled) | Whether enable tracing tags that generated by BridgeCrew Yor. | `bool` | `false` | no | diff --git a/main.tf b/main.tf index e9820806..5100292f 100644 --- a/main.tf +++ b/main.tf @@ -36,6 +36,7 @@ resource "azurerm_kubernetes_cluster" "main" { role_based_access_control_enabled = var.role_based_access_control_enabled run_command_enabled = var.run_command_enabled sku_tier = var.sku_tier + support_plan = var.support_plan tags = merge(var.tags, (/**/ (var.tracing_tags_enabled ? { for k, v in /**/ { avm_git_commit = "678838cb66e8ae110c0e5057465b6341033e1aef" avm_git_file = "main.tf" diff --git a/variables.tf b/variables.tf index 84aa171f..3ce8e17c 100644 --- a/variables.tf +++ b/variables.tf @@ -1268,6 +1268,17 @@ variable "storage_profile_snapshot_controller_enabled" { description = "(Optional) Is the Snapshot Controller enabled? Defaults to `true`" } +variable "support_plan" { + type = string + default = "KubernetesOfficial" + description = "The support plan which should be used for this Kubernetes Cluster. Possible values are `KubernetesOfficial` and `AKSLongTermSupport`." + + validation { + condition = contains(["KubernetesOfficial", "AKSLongTermSupport"], var.support_plan) + error_message = "The support plan must be either `KubernetesOfficial` or `AKSLongTermSupport`." + } +} + variable "tags" { type = map(string) default = {}