reduced number of words in names and remove cluster name in node names

This commit is contained in:
Karim Naufal
2022-03-04 23:41:49 +01:00
parent 5cf6f9eef4
commit 385bd788be
5 changed files with 8 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
resource "random_pet" "agents" {
for_each = local.agent_nodepools
length = 1
}
module "agents" {
@@ -7,7 +8,7 @@ module "agents" {
for_each = local.agent_nodepools
name = "${each.key}-${random_pet.cluster.id}-${random_pet.agents[each.key].id}"
name = "${each.value.nodepool_name}-${random_pet.agents[each.key].id}"
ssh_keys = [hcloud_ssh_key.k3s.id]
public_key = var.public_key
private_key = var.private_key