dynamic "upgrade_settings" {
for_each = {
for k, v in try(var.cluster.node_pools.upgrade_settings, {}) : k => v
}
content {
max_surge = upgrade_settings.value.default_node_pool.max_surge
}
}
As this for_each loop is reading from var.cluster.node_pools, this conflicts with another for_each that sets up a list of node pools within the resource "azurerm_kubernetes_cluster_node_pool" "pools".
Due to this conflict it is impossible to set max_surge on the default node pool or any upgrade_settings on additional node pools.
Current situation:
Within the
default_node_pool
block:As this for_each loop is reading from var.cluster.node_pools, this conflicts with another for_each that sets up a list of node pools within the resource "azurerm_kubernetes_cluster_node_pool" "pools".
Due to this conflict it is impossible to set max_surge on the default node pool or any upgrade_settings on additional node pools.
Proposed fix: