Created
February 25, 2023 05:33
-
-
Save badri/9c23b60d80b84386b0e5a234fa4796d7 to your computer and use it in GitHub Desktop.
YAML config based node pools
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
locals { | |
node_pools = yamldecode(file("${path.module}/node-pool.yaml")) | |
} | |
resource "azurerm_kubernetes_cluster_node_pool" "aks_node_pool" { | |
count = length(local.node_pools) | |
name = local.node_pools[count.index].name | |
kubernetes_cluster_id = azurerm_kubernetes_cluster.aks.id | |
vm_size = local.node_pools[count.index].vm_size | |
node_count = local.node_pools[count.index].node_count | |
tags = merge(local.node_pools[count.index].tags...) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment