made cluster name prefix configurable and tweaked ways the agents random pets are created

small tweaks

small tweaks
This commit is contained in:
Karim Naufal
2022-03-05 05:33:29 +01:00
parent b93087d896
commit e6b8249846
7 changed files with 21 additions and 11 deletions

View File

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