Skip to content

Commit

Permalink
align node pool variables
Browse files Browse the repository at this point in the history
  • Loading branch information
nellyk committed Oct 1, 2024
1 parent c3db3a0 commit b4768d5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions examples/with_availability_zone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ module "test" {
min_count = 2
os_sku = "Ubuntu"
mode = "User"
os_disk_size_gb = 128
},
ingress = {
name = "ingress"
Expand All @@ -76,6 +77,8 @@ module "test" {
min_count = 2
os_sku = "Ubuntu"
mode = "User"
os_disk_size_gb = 128
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion examples/with_availability_zone/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ module "test" {
min_count = 2
os_sku = "Ubuntu"
mode = "User"
os_disk_size_gb = 128
},
ingress = {
name = "ingress"
Expand All @@ -70,6 +71,8 @@ module "test" {
min_count = 2
os_sku = "Ubuntu"
mode = "User"
os_disk_size_gb = 128

}
}
}
}
2 changes: 2 additions & 0 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ locals {
max_count = pool.max_count
min_count = pool.min_count
os_sku = pool.os_sku
mode = pool.mode
os_disk_size_gb = pool.os_disk_size_gb
zone = zone
}
]
Expand Down
3 changes: 3 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ resource "azurerm_kubernetes_cluster" "this" {
## Resources that only support UserAssigned
dynamic "identity" {
for_each = local.managed_identities.user_assigned

content {
type = identity.value.type
identity_ids = identity.value.user_assigned_resource_ids
Expand Down Expand Up @@ -236,7 +237,9 @@ resource "azurerm_kubernetes_cluster_node_pool" "this" {
enable_auto_scaling = true
max_count = each.value.max_count
min_count = each.value.min_count
mode = each.value.mode
orchestrator_version = each.value.orchestrator_version
os_disk_size_gb = each.value.os_disk_size_gb
os_sku = each.value.os_sku
tags = var.tags
vnet_subnet_id = module.avm_res_network_virtualnetwork.subnets["subnet"].resource_id
Expand Down

0 comments on commit b4768d5

Please sign in to comment.