mirror of
https://github.com/2martens/terraform.git
synced 2026-10-19 07:06:51 +02:00
Added reverse DNS entries
This commit is contained in:
@@ -48,4 +48,20 @@ resource "inwx_nameserver_record" "kube_api_server_aaaa" {
|
|||||||
content = var.create_loadbalancer ? hcloud_load_balancer.kubernetes[0].ipv6 : hcloud_primary_ip.ipv6_manager_address[0].ip_address
|
content = var.create_loadbalancer ? hcloud_load_balancer.kubernetes[0].ipv6 : hcloud_primary_ip.ipv6_manager_address[0].ip_address
|
||||||
type = "AAAA"
|
type = "AAAA"
|
||||||
ttl = 3600
|
ttl = 3600
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "hcloud_rdns" "ipv4_loadbalancer" {
|
||||||
|
count = var.create_loadbalancer ? 1 : 0
|
||||||
|
|
||||||
|
load_balancer_id = hcloud_load_balancer.kubernetes[0].id
|
||||||
|
ip_address = hcloud_load_balancer.kubernetes[0].ipv4
|
||||||
|
dns_ptr = local.kube_api_server_domain
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "hcloud_rdns" "ipv6_loadbalancer" {
|
||||||
|
count = var.create_loadbalancer ? 1 : 0
|
||||||
|
|
||||||
|
load_balancer_id = hcloud_load_balancer.kubernetes[0].id
|
||||||
|
ip_address = hcloud_load_balancer.kubernetes[0].ipv6
|
||||||
|
dns_ptr = local.kube_api_server_domain
|
||||||
}
|
}
|
||||||
@@ -18,6 +18,14 @@ resource "hcloud_primary_ip" "ipv4_manager_address" {
|
|||||||
auto_delete = false
|
auto_delete = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "hcloud_rdns" "ipv4_manager" {
|
||||||
|
count = var.create_loadbalancer ? 0 : var.number_nodes
|
||||||
|
|
||||||
|
primary_ip_id = hcloud_primary_ip.ipv4_manager_address[count.index].id
|
||||||
|
ip_address = hcloud_primary_ip.ipv4_manager_address[count.index].ip_address
|
||||||
|
dns_ptr = inwx_nameserver_record.manager_aaaa.name
|
||||||
|
}
|
||||||
|
|
||||||
resource "hcloud_primary_ip" "ipv6_manager_address" {
|
resource "hcloud_primary_ip" "ipv6_manager_address" {
|
||||||
count = var.number_nodes
|
count = var.number_nodes
|
||||||
|
|
||||||
@@ -28,6 +36,14 @@ resource "hcloud_primary_ip" "ipv6_manager_address" {
|
|||||||
auto_delete = false
|
auto_delete = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
dns_ptr = inwx_nameserver_record.manager_aaaa.name
|
||||||
|
}
|
||||||
|
|
||||||
resource "hcloud_server_network" "manager_private" {
|
resource "hcloud_server_network" "manager_private" {
|
||||||
count = var.number_nodes
|
count = var.number_nodes
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,14 @@ resource "hcloud_primary_ip" "ipv6_worker_address" {
|
|||||||
auto_delete = false
|
auto_delete = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "hcloud_rdns" "ipv6_manager" {
|
||||||
|
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
|
||||||
|
dns_ptr = inwx_nameserver_record.worker_aaaa.name
|
||||||
|
}
|
||||||
|
|
||||||
resource "hcloud_server_network" "worker_private" {
|
resource "hcloud_server_network" "worker_private" {
|
||||||
count = var.number_worker_nodes
|
count = var.number_worker_nodes
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user