From b0fd947abf30cb856cdf0c1266263c8a90257faf Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 25 Sep 2022 21:07:33 +0200 Subject: [PATCH] fix: use fqdn as instance name --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 2d96658..e620a67 100644 --- a/main.tf +++ b/main.tf @@ -48,7 +48,7 @@ resource "hcloud_server" "server" { for_each = { for row in var.server : row.name => row } depends_on = [hcloud_ssh_key.key] - name = each.value.name + name = "${each.value.name}.${try(each.value.dns_zone, var.server_dns_zone)}" server_type = each.value.server_type image = each.value.image datacenter = each.value.datacenter