Skip to content

Instantly share code, notes, and snippets.

@badri
Created February 25, 2023 06:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save badri/8cfbd81932a3748654ff0245f17e1a13 to your computer and use it in GitHub Desktop.
Save badri/8cfbd81932a3748654ff0245f17e1a13 to your computer and use it in GitHub Desktop.
node pools tf using for_each
resource "azurerm_kubernetes_cluster_node_pool" "aks_node_pool" {
for_each = {
for index, node_pool in local.node_pools :
node_pool.name => node_pool
}
name = each.value.name
kubernetes_cluster_id = azurerm_kubernetes_cluster.aks.id
vm_size = each.value.vm_size
node_count = each.value.node_count
tags = merge(each.value.tags...)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment