Skip to content

Commit

Permalink
fix failing builds
Browse files Browse the repository at this point in the history
  • Loading branch information
nellyk committed Mar 5, 2024
1 parent daeb296 commit c14ddf9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ resource "azurerm_kubernetes_cluster_node_pool" "this" {
# if the region does not have zone create a single node pool with the zone as null
# if node pools are not emplty check if the node has a zone if yes then create a node pool per zone otherwise create a single node pool
# count = var.node_pools != null ? var.zones ? 3 : 1 : length(local.zones)
count = var.node_pools != null ? try(var.zones, local.zones) != null ? 3 : 1 : length(var.zones)
count = var.node_pools != null ? (var.zones != null ? length(var.node_pools) * 3 : length(var.node_pools)) : length(var.zones)

kubernetes_cluster_id = azurerm_kubernetes_cluster.this.id
name = "workload${count.index + 1}"
Expand Down
2 changes: 2 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ variable "managed_identities" {

variable "node_pools" {
type = list(object({
name = string
vm_size = string
enable_auto_scaling = bool
max_count = number
Expand All @@ -109,6 +110,7 @@ variable "node_pools" {
zones = optional(string)
}))
default = [{
name = "workload"
vm_size = "Standard_D4d_v5"
enable_auto_scaling = true
max_count = 110
Expand Down

0 comments on commit c14ddf9

Please sign in to comment.