Skip to content

Commit 65c3452

Browse files
committed
fix: host module should not create rdns if instances have only private ips.
1 parent 0b05cec commit 65c3452

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/host/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ resource "null_resource" "registries" {
144144
}
145145

146146
resource "hcloud_rdns" "server" {
147-
count = var.base_domain != "" ? 1 : 0
147+
count = (var.base_domain != "" && !(var.disable_ipv4 && var.disable_ipv6)) ? 1 : 0
148148

149149
server_id = hcloud_server.server.id
150150
ip_address = coalesce(hcloud_server.server.ipv4_address, hcloud_server.server.ipv6_address, try(one(hcloud_server.server.network).ip, null))

0 commit comments

Comments
 (0)