Skip to content

Commit 964ed0b

Browse files
authored
feat(aks): add agents_pool_name, agents_label and sku_tier params to module interface (#846)
1 parent 4fb1abe commit 964ed0b

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

modules/aks/azure/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,15 @@ module "cluster" {
6060

6161
kubernetes_version = var.kubernetes_version
6262
orchestrator_version = var.kubernetes_version
63+
sku_tier = var.sku_tier
6364

6465
resource_group_name = data.azurerm_resource_group.this.name
6566
prefix = var.cluster_name
6667
network_plugin = "azure"
6768
network_policy = var.network_policy
6869
vnet_subnet_id = var.vnet_subnet_id
70+
agents_pool_name = var.agents_pool_name
71+
agents_labels = var.agents_labels
6972
agents_count = var.agents_count
7073
agents_size = var.agents_size
7174
agents_max_pods = var.agents_max_pods

modules/aks/azure/variables.tf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ variable "vnet_subnet_id" {
1919
type = string
2020
}
2121

22+
23+
variable "agents_pool_name" {
24+
description = "The default Azure AKS agentpool (nodepool) name."
25+
type = string
26+
default = "nodepool"
27+
}
28+
2229
variable "agents_count" {
2330
description = "The number of Agents that should exist in the Agent Pool. Please set `agents_count` `null` while `enable_auto_scaling` is `true` to avoid possible `agents_count` changes."
2431
type = number
@@ -37,6 +44,12 @@ variable "agents_size" {
3744
default = "Standard_D4s_v3"
3845
}
3946

47+
variable "agents_labels" {
48+
description = "A map of Kubernetes labels which should be applied to nodes in the Default Node Pool. Changing this forces a new resource to be created."
49+
type = map(string)
50+
default = {}
51+
}
52+
4053
variable "os_disk_size_gb" {
4154
description = "Disk size of nodes in GBs."
4255
type = number
@@ -87,3 +100,9 @@ variable "storage_account_replication_type" {
87100
default = "GRS"
88101
type = string
89102
}
103+
104+
variable "sku_tier" {
105+
description = "The SKU Tier that should be used for this Kubernetes Cluster. Possible values are Free and Paid"
106+
default = "Free"
107+
type = string
108+
}

0 commit comments

Comments
 (0)