Skip to content

Commit a2b7e7d

Browse files
ecklm-alerantlonegunmanb
authored andcommitted
Add support plan variable
It's available through terraform-provider-azurerm since v3.84.0. Allowed-by: hashicorp/terraform-provider-azurerm#23970 Resolves: #477
1 parent 654d530 commit a2b7e7d

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ No modules.
396396
| <a name="input_storage_profile_enabled"></a> [storage\_profile\_enabled](#input\_storage\_profile\_enabled) | Enable storage profile | `bool` | `false` | no |
397397
| <a name="input_storage_profile_file_driver_enabled"></a> [storage\_profile\_file\_driver\_enabled](#input\_storage\_profile\_file\_driver\_enabled) | (Optional) Is the File CSI driver enabled? Defaults to `true` | `bool` | `true` | no |
398398
| <a name="input_storage_profile_snapshot_controller_enabled"></a> [storage\_profile\_snapshot\_controller\_enabled](#input\_storage\_profile\_snapshot\_controller\_enabled) | (Optional) Is the Snapshot Controller enabled? Defaults to `true` | `bool` | `true` | no |
399+
| <a name="input_support_plan"></a> [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 |
399400
| <a name="input_tags"></a> [tags](#input\_tags) | Any tags that should be present on the AKS cluster resources | `map(string)` | `{}` | no |
400401
| <a name="input_temporary_name_for_rotation"></a> [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 |
401402
| <a name="input_tracing_tags_enabled"></a> [tracing\_tags\_enabled](#input\_tracing\_tags\_enabled) | Whether enable tracing tags that generated by BridgeCrew Yor. | `bool` | `false` | no |

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ resource "azurerm_kubernetes_cluster" "main" {
3636
role_based_access_control_enabled = var.role_based_access_control_enabled
3737
run_command_enabled = var.run_command_enabled
3838
sku_tier = var.sku_tier
39+
support_plan = var.support_plan
3940
tags = merge(var.tags, (/*<box>*/ (var.tracing_tags_enabled ? { for k, v in /*</box>*/ {
4041
avm_git_commit = "678838cb66e8ae110c0e5057465b6341033e1aef"
4142
avm_git_file = "main.tf"

variables.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,6 +1268,17 @@ variable "storage_profile_snapshot_controller_enabled" {
12681268
description = "(Optional) Is the Snapshot Controller enabled? Defaults to `true`"
12691269
}
12701270

1271+
variable "support_plan" {
1272+
type = string
1273+
default = "KubernetesOfficial"
1274+
description = "The support plan which should be used for this Kubernetes Cluster. Possible values are `KubernetesOfficial` and `AKSLongTermSupport`."
1275+
1276+
validation {
1277+
condition = contains(["KubernetesOfficial", "AKSLongTermSupport"], var.support_plan)
1278+
error_message = "The support plan must be either `KubernetesOfficial` or `AKSLongTermSupport`."
1279+
}
1280+
}
1281+
12711282
variable "tags" {
12721283
type = map(string)
12731284
default = {}

0 commit comments

Comments
 (0)