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 c14ddf9 commit 57430f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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 ? (var.zones != null ? length(var.node_pools) * 3 : length(var.node_pools)) : length(var.zones)
count = var.node_pools != null ? (var.zones != null ? length(var.node_pools) * 3 : length(var.node_pools)) : 0

kubernetes_cluster_id = azurerm_kubernetes_cluster.this.id
name = "workload${count.index + 1}"
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ variable "node_pools" {
mode = optional(string)
os_disk_size_gb = optional(number, null)
tags = optional(map(string), {})
zones = optional(string)
zones = optional(set(string))
}))
default = [{
name = "workload"
Expand Down

0 comments on commit 57430f7

Please sign in to comment.