Skip to content

Commit

Permalink
Add support plan variable
Browse files Browse the repository at this point in the history
It's available through terraform-provider-azurerm since v3.84.0.

Allowed-by: hashicorp/terraform-provider-azurerm#23970
Resolves: #477
  • Loading branch information
ecklm authored and lonegunmanb committed Feb 19, 2024
1 parent 654d530 commit a2b7e7d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ No modules.
| <a name="input_storage_profile_enabled"></a> [storage\_profile\_enabled](#input\_storage\_profile\_enabled) | Enable storage profile | `bool` | `false` | no |
| <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 |
| <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 |
| <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 |
| <a name="input_tags"></a> [tags](#input\_tags) | Any tags that should be present on the AKS cluster resources | `map(string)` | `{}` | no |
| <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 |
| <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 |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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, (/*<box>*/ (var.tracing_tags_enabled ? { for k, v in /*</box>*/ {
avm_git_commit = "678838cb66e8ae110c0e5057465b6341033e1aef"
avm_git_file = "main.tf"
Expand Down
11 changes: 11 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down

0 comments on commit a2b7e7d

Please sign in to comment.