Commit bc5cf4f5 authored by Alex Hanselka's avatar Alex Hanselka
Browse files

fix: wrong variable for DNS zone

parent 3a436cf0
Pipeline #3677 passed with stage
in 3 minutes and 45 seconds
data "google_dns_managed_zone" "dns-zone" {
name = var.dns_zone
name = var.dns-zone
}
data "template_file" "init" {
......@@ -46,13 +46,13 @@ resource "hcloud_server" "generic-hcloud" {
resource "hcloud_rdns" "ipv4" {
server_id = "${hcloud_server.generic-hcloud.id}"
ip_address = "${hcloud_server.generic-hcloud.ipv4_address}"
dns_ptr = "${var.node_name}.${data.google_dns_managed_zone.dns_zone.dns_name}"
dns_ptr = "${var.node_name}.${data.google_dns_managed_zone.dns-zone.dns_name}"
}
resource "hcloud_rdns" "ipv6" {
server_id = "${hcloud_server.generic-hcloud.id}"
ip_address = "${hcloud_server.generic-hcloud.ipv6_address}"
dns_ptr = "${var.node_name}.${data.google_dns_managed_zone.dns_zone.dns_name}"
dns_ptr = "${var.node_name}.${data.google_dns_managed_zone.dns-zone.dns_name}"
}
resource "ansible_host" "hcloud-host" {
......@@ -63,22 +63,22 @@ resource "ansible_host" "hcloud-host" {
ansible_user = "root"
ansible_host = "${hcloud_server.generic-hcloud.ipv4_address}"
wireguard_address = "${var.wireguard_address}"
wireguard_endpoint = "${var.node_name}.hc.${data.google_dns_managed_zone.dns_zone.dns_name}"
wireguard_endpoint = "${var.node_name}.hc.${data.google_dns_managed_zone.dns-zone.dns_name}"
}
}
resource "google_dns_record_set" "external" {
name = "${var.node_name}.hc.${data.google_dns_managed_zone.dns_zone.dns_name}"
name = "${var.node_name}.hc.${data.google_dns_managed_zone.dns-zone.dns_name}"
type = "A"
ttl = 3600
managed_zone = "${data.google_dns_managed_zone.dns_zone.name}"
managed_zone = "${data.google_dns_managed_zone.dns-zone.name}"
rrdatas = ["${hcloud_server.generic-hcloud.ipv4_address}"]
}
resource "google_dns_record_set" "external-v6" {
name = "${var.node_name}.hc.${data.google_dns_managed_zone.dns_zone.dns_name}"
name = "${var.node_name}.hc.${data.google_dns_managed_zone.dns-zone.dns_name}"
type = "AAAA"
ttl = 3600
managed_zone = "${data.google_dns_managed_zone.dns_zone.name}"
managed_zone = "${data.google_dns_managed_zone.dns-zone.name}"
rrdatas = ["${hcloud_server.generic-hcloud.ipv6_address}1"]
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment