From 43447bc7094ac9ebafd426f3dc3a7bb9ad2402c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niko=20Gran=C3=B6?= Date: Thu, 16 Apr 2020 17:34:50 +0300 Subject: [PATCH] Use FQDN only for PTR --- roles/tf-infrastructure/terraform/main.tf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/tf-infrastructure/terraform/main.tf b/roles/tf-infrastructure/terraform/main.tf index ac29d3d..68c939a 100644 --- a/roles/tf-infrastructure/terraform/main.tf +++ b/roles/tf-infrastructure/terraform/main.tf @@ -24,7 +24,7 @@ resource "hcloud_network_subnet" "worker" { resource "hcloud_server" "master" { count = 1 - name = "master.${var.domain}" + name = "master" image = "ubuntu-18.04" server_type = var.master_servertype location = var.datacenter @@ -35,7 +35,7 @@ resource "hcloud_rdns" "rdns_master" { count = length(hcloud_server.master) server_id = hcloud_server.master[count.index].id ip_address = hcloud_server.master[count.index].ipv4_address - dns_ptr = hcloud_server.master[count.index].name + dns_ptr = "master.${var.domain}" } resource "hcloud_server_network" "master_network" { @@ -48,7 +48,7 @@ resource "hcloud_server_network" "master_network" { # Worker resource "hcloud_server" "worker" { count = var.worker_count - name = "node-${count.index + 1}.${var.domain}" + name = "node-${count.index + 1}" image = "ubuntu-18.04" server_type = var.worker_servertype location = var.datacenter @@ -59,7 +59,7 @@ resource "hcloud_rdns" "rdns_worker" { count = length(hcloud_server.worker) server_id = hcloud_server.worker[count.index].id ip_address = hcloud_server.worker[count.index].ipv4_address - dns_ptr = hcloud_server.worker[count.index].name + dns_ptr = "node-${count.index + 1}.${var.domain}" } resource "hcloud_server_network" "worker_network" {