mirror of
https://github.com/2martens/terraform.git
synced 2026-10-17 14:36:50 +02:00
Fixed host and dns entries
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
resource "null_resource" "install_setup" {
|
||||
connection {
|
||||
host = format("%s%d", hcloud_server.manager[0].ipv6_address, 1)
|
||||
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 = format("%s%d", hcloud_server.manager[0].ipv6_address, 1)
|
||||
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 = format("%s%d", hcloud_server.manager[0].ipv6_address, 1)
|
||||
host = hcloud_server.manager[0].ipv6_address
|
||||
user = "root"
|
||||
type = "ssh"
|
||||
private_key = var.terraform_private_ssh_key
|
||||
|
||||
@@ -45,7 +45,7 @@ resource "inwx_nameserver_record" "kube_api_server_a" {
|
||||
resource "inwx_nameserver_record" "kube_api_server_aaaa" {
|
||||
domain = var.domain
|
||||
name = local.kube_api_server_domain
|
||||
content = format("%s%d", var.create_loadbalancer ? hcloud_load_balancer.kubernetes[0].ipv6 : hcloud_primary_ip.ipv6_manager_address[0].ip_address, 1)
|
||||
content = var.create_loadbalancer ? hcloud_load_balancer.kubernetes[0].ipv6 : hcloud_server.manager[0].ipv6_address
|
||||
type = "AAAA"
|
||||
ttl = 3600
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ resource "inwx_nameserver_record" "manager_aaaa" {
|
||||
|
||||
domain = var.domain
|
||||
name = format("%s-%d.%s", "node", count.index, local.kube_api_server_domain)
|
||||
content = format("%s%d", hcloud_primary_ip.ipv6_manager_address[count.index].ip_address, 1)
|
||||
content = hcloud_server.manager[count.index].ipv6_address
|
||||
type = "AAAA"
|
||||
ttl = 3600
|
||||
}
|
||||
@@ -40,7 +40,7 @@ resource "hcloud_rdns" "ipv6_manager" {
|
||||
count = var.number_nodes
|
||||
|
||||
primary_ip_id = hcloud_primary_ip.ipv6_manager_address[count.index].id
|
||||
ip_address = hcloud_primary_ip.ipv6_manager_address[count.index].ip_address
|
||||
ip_address = hcloud_server.manager[count.index].ipv6_address
|
||||
dns_ptr = inwx_nameserver_record.manager_aaaa[count.index].name
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ resource "null_resource" "setup_tokens" {
|
||||
}
|
||||
|
||||
connection {
|
||||
host = format("%s%d", hcloud_server.manager[0].ipv6_address, 1)
|
||||
host = hcloud_server.manager[0].ipv6_address
|
||||
user = "root"
|
||||
type = "ssh"
|
||||
private_key = var.terraform_private_ssh_key
|
||||
@@ -154,7 +154,7 @@ resource "null_resource" "join_nodes" {
|
||||
rerun = random_id.cluster_token.hex
|
||||
}
|
||||
connection {
|
||||
host = format("%s%d", element(hcloud_server.manager.*.ipv6_address, count.index + 1), 1)
|
||||
host = element(hcloud_server.manager.*.ipv6_address, count.index + 1)
|
||||
user = "root"
|
||||
type = "ssh"
|
||||
private_key = var.terraform_private_ssh_key
|
||||
|
||||
@@ -3,7 +3,7 @@ resource "inwx_nameserver_record" "worker_aaaa" {
|
||||
|
||||
domain = var.domain
|
||||
name = format("%s-%d.%s", "node", count.index, local.kube_api_server_domain)
|
||||
content = format("%s%d", hcloud_primary_ip.ipv6_worker_address[count.index].ip_address, 1)
|
||||
content = hcloud_server.worker[count.index].ipv6_address
|
||||
type = "AAAA"
|
||||
ttl = 3600
|
||||
}
|
||||
@@ -22,7 +22,7 @@ resource "hcloud_rdns" "ipv6_worker" {
|
||||
count = var.number_worker_nodes
|
||||
|
||||
primary_ip_id = hcloud_primary_ip.ipv6_worker_address[count.index].id
|
||||
ip_address = hcloud_primary_ip.ipv6_worker_address[count.index].ip_address
|
||||
ip_address = hcloud_server.worker[count.index].ipv6_address
|
||||
dns_ptr = inwx_nameserver_record.worker_aaaa[count.index].name
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ resource "null_resource" "join_workers" {
|
||||
rerun = random_id.cluster_token.hex
|
||||
}
|
||||
connection {
|
||||
host = format("%s%d", element(hcloud_server.worker.*.ipv6_address, count.index), 1)
|
||||
host = element(hcloud_server.worker.*.ipv6_address, count.index)
|
||||
user = "root"
|
||||
type = "ssh"
|
||||
private_key = var.terraform_private_ssh_key
|
||||
|
||||
Reference in New Issue
Block a user