From 8a420a5c350756ce7593690a134a1043f5914275 Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Thu, 14 Nov 2024 20:30:39 +0100 Subject: [PATCH] Add rdns to ipv6 addresses Co-Authored-By: Manuel --- modules/infrastructure/hcloud.tf | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/infrastructure/hcloud.tf b/modules/infrastructure/hcloud.tf index 8dc6029..9126187 100644 --- a/modules/infrastructure/hcloud.tf +++ b/modules/infrastructure/hcloud.tf @@ -58,13 +58,20 @@ resource "hcloud_server" "nodes" { } } -resource "hcloud_rdns" "nodes_rdns" { +resource "hcloud_rdns" "nodes_rdns_ipv4" { for_each = local.hetzner_hosts server_id = hcloud_server.nodes[each.key].id ip_address = hcloud_server.nodes[each.key].ipv4_address dns_ptr = each.value.rdns } +resource "hcloud_rdns" "nodes_rdns_ipv6" { + for_each = local.hetzner_hosts + server_id = hcloud_server.nodes[each.key].id + ip_address = hcloud_server.nodes[each.key].ipv6_address + dns_ptr = each.value.rdns +} + locals { default_firewall_source_ips = [ "0.0.0.0/0", "::/0" ] }