diff --git a/locals.tf b/locals.tf index fd4e513..0d2750c 100644 --- a/locals.tf +++ b/locals.tf @@ -15,6 +15,8 @@ locals { windows_nodes = (length([for v in local.node_pools : v if lower(v.os_type) == "windows"]) > 0 ? true : false) + api_server_authorized_ip_ranges = (var.api_server_authorized_ip_ranges == null ? null : values(var.api_server_authorized_ip_ranges)) + invalid_node_pool_attributes = join(",", flatten([for np in values(var.node_pools) : [for k, v in np : k if !(contains(keys(var.node_pool_defaults), k))]])) validate_node_pool_attributes = (length(local.invalid_node_pool_attributes) > 0 ? file("ERROR: invalid node pool attribute: ${local.invalid_node_pool_attributes}") : null) diff --git a/main.tf b/main.tf index f23c0e7..2dbf19a 100644 --- a/main.tf +++ b/main.tf @@ -72,7 +72,7 @@ resource "azurerm_kubernetes_cluster" "aks" { } } - api_server_authorized_ip_ranges = values(var.api_server_authorized_ip_ranges) + api_server_authorized_ip_ranges = local.api_server_authorized_ip_ranges addon_profile { kube_dashboard {