Created
February 25, 2023 06:23
-
-
Save badri/8cfbd81932a3748654ff0245f17e1a13 to your computer and use it in GitHub Desktop.
node pools tf using for_each
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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