Skip to content

Commit

Permalink
Merge pull request #169 from to266/aks-sku-tier
Browse files Browse the repository at this point in the history
AKS: SKU tier and node_labels to default_pool
  • Loading branch information
pst committed Apr 1, 2021
2 parents 608123c + 170bf26 commit 44e73dc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions azurerm/_modules/aks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ resource "azurerm_kubernetes_cluster" "current" {
location = data.azurerm_resource_group.current.location
resource_group_name = data.azurerm_resource_group.current.name
dns_prefix = var.dns_prefix
sku_tier = var.sku_tier

role_based_access_control {
enabled = true
Expand All @@ -30,6 +31,7 @@ resource "azurerm_kubernetes_cluster" "current" {

vnet_subnet_id = var.network_plugin == "azure" ? azurerm_subnet.current[0].id : null
max_pods = var.max_pods
node_labels = var.metadata_labels
}

network_profile {
Expand Down
6 changes: 6 additions & 0 deletions azurerm/_modules/aks/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,9 @@ variable "user_assigned_identity_id" {
description = "ID of the UserAssigned identity to use."
default = null
}

variable "sku_tier" {
type = string
description = "The SKU tier to use for the cluster. Possible values are 'Free' and 'Paid'. Defaults to 'Free'."
default = "Free"
}
2 changes: 2 additions & 0 deletions azurerm/cluster/configuration.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ locals {

dns_prefix = lookup(local.cfg, "dns_prefix", "api")

sku_tier = lookup(local.cfg, "sku_tier", "Free")

vnet_address_space = split(",", lookup(local.cfg, "vnet_address_space", "10.0.0.0/8"))
subnet_address_prefixes = split(",", lookup(local.cfg, "subnet_address_prefixes", "10.1.0.0/16"))

Expand Down
2 changes: 2 additions & 0 deletions azurerm/cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ module "cluster" {

dns_prefix = local.dns_prefix

sku_tier = local.sku_tier

vnet_address_space = local.vnet_address_space
subnet_address_prefixes = local.subnet_address_prefixes
subnet_service_endpoints = local.subnet_service_endpoints
Expand Down

0 comments on commit 44e73dc

Please sign in to comment.