Fix host entries in provisioners

This commit is contained in:
2023-11-04 14:52:29 +01:00
parent 3423a54e7d
commit 9bd74debf5
2 changed files with 3 additions and 3 deletions
@@ -111,7 +111,7 @@ resource "null_resource" "setup_tokens" {
} }
connection { connection {
host = hcloud_server.manager[0].ipv6_address host = format("%s%d", hcloud_server.manager[0].ipv6_address, 1)
user = "root" user = "root"
type = "ssh" type = "ssh"
private_key = var.terraform_private_ssh_key private_key = var.terraform_private_ssh_key
@@ -150,7 +150,7 @@ resource "null_resource" "join_nodes" {
rerun = random_id.cluster_token.hex rerun = random_id.cluster_token.hex
} }
connection { connection {
host = element(hcloud_server.manager.*.ipv6_address, count.index + 1) host = format("%s%d", element(hcloud_server.manager.*.ipv6_address, count.index + 1), 1)
user = "root" user = "root"
type = "ssh" type = "ssh"
private_key = var.terraform_private_ssh_key private_key = var.terraform_private_ssh_key
+1 -1
View File
@@ -87,7 +87,7 @@ resource "null_resource" "join_workers" {
rerun = random_id.cluster_token.hex rerun = random_id.cluster_token.hex
} }
connection { connection {
host = element(hcloud_server.worker.*.ipv6_address, count.index) host = format("%s%d", element(hcloud_server.worker.*.ipv6_address, count.index), 1)
user = "root" user = "root"
type = "ssh" type = "ssh"
private_key = var.terraform_private_ssh_key private_key = var.terraform_private_ssh_key