re-add cluster pet name to nodes

This commit is contained in:
phaer 2022-03-05 00:19:16 +01:00
parent 213845e543
commit 34eb575223
3 changed files with 3 additions and 3 deletions

View File

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

View File

@ -7,7 +7,7 @@ module "control_planes" {
source = "./modules/host"
count = var.control_plane_count
name = "control-plane-${random_pet.control_planes[count.index].id}"
name = "control-plane-${random_pet.cluster.id}-${random_pet.control_planes[count.index].id}"
ssh_keys = [hcloud_ssh_key.k3s.id]
public_key = var.public_key

View File

@ -1,5 +1,5 @@
resource "random_pet" "cluster" {
length = 2
length = 1
}
resource "random_password" "k3s_token" {