Skip to content

Commit

Permalink
Use FQDN only for PTR
Browse files Browse the repository at this point in the history
  • Loading branch information
NikoGrano authored and rvasilev committed Apr 16, 2020
1 parent 73bcbf5 commit 43447bc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions roles/tf-infrastructure/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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" {
Expand All @@ -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
Expand All @@ -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" {
Expand Down

0 comments on commit 43447bc

Please sign in to comment.