Skip to content

Commit

Permalink
update extra node pool's name suffix, use uuid() as random seed
Browse files Browse the repository at this point in the history
  • Loading branch information
lonegunmanb committed Feb 19, 2024
1 parent 7aa4042 commit 5ff67ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/multiple_node_pools/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ locals {
vm_size = "Standard_D2s_v3"
node_count = 1
vnet_subnet_id = azurerm_subnet.test.id
create_before_destroy = i % 2 == 0
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion extra_node_pool.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ resource "azurerm_kubernetes_cluster_node_pool" "node_pool_create_before_destroy
for_each = local.node_pools_create_before_destroy

kubernetes_cluster_id = azurerm_kubernetes_cluster.main.id
name = "${each.value.name}${substr(md5(jsonencode(each.value)), 0, 4)}"
name = "${each.value.name}${substr(md5(uuid()), 0, 4)}"
vm_size = each.value.vm_size
capacity_reservation_group_id = each.value.capacity_reservation_group_id
custom_ca_trust_enabled = each.value.custom_ca_trust_enabled
Expand Down

0 comments on commit 5ff67ea

Please sign in to comment.