Fixed host values for provisioners

This commit is contained in:
2023-11-04 13:27:22 +01:00
parent d35466a056
commit 39a5afd2f4
3 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
resource "null_resource" "install_setup" {
connection {
host = hcloud_server_network.manager_private[0].ip
host = hcloud_server.manager[0].ipv6_address
user = "root"
type = "ssh"
private_key = var.terraform_private_ssh_key
@@ -44,7 +44,7 @@ resource "null_resource" "install_argocd_single" {
count = var.number_nodes < 3 ? 1 : 0
connection {
host = hcloud_server_network.manager_private[0].ip
host = hcloud_server.manager[0].ipv6_address
user = "root"
type = "ssh"
private_key = var.terraform_private_ssh_key
@@ -66,7 +66,7 @@ resource "null_resource" "install_argocd_ha" {
count = var.number_nodes >= 3 ? 1 : 0
connection {
host = hcloud_server_network.manager_private[0].ip
host = hcloud_server.manager[0].ipv6_address
user = "root"
type = "ssh"
private_key = var.terraform_private_ssh_key
@@ -95,7 +95,7 @@ resource "null_resource" "setup_tokens" {
}
connection {
host = hcloud_server_network.manager_private[0].ip
host = hcloud_server.manager[0].ipv6_address
user = "root"
type = "ssh"
private_key = var.terraform_private_ssh_key
@@ -134,7 +134,7 @@ resource "null_resource" "join_nodes" {
rerun = random_id.cluster_token.hex
}
connection {
host = element(hcloud_server_network.manager_private.*.ip, count.index + 1)
host = element(hcloud_server.manager.*.ipv6_address, count.index + 1)
user = "root"
type = "ssh"
private_key = var.terraform_private_ssh_key
+1 -1
View File
@@ -79,7 +79,7 @@ resource "null_resource" "join_workers" {
rerun = random_id.cluster_token.hex
}
connection {
host = element(hcloud_server_network.worker_private.*.ip, count.index)
host = element(hcloud_server.worker.*.ipv6_address, count.index)
user = "root"
type = "ssh"
private_key = var.terraform_private_ssh_key