-
Notifications
You must be signed in to change notification settings - Fork 5
/
terraform_rdns.tf
55 lines (48 loc) · 2.53 KB
/
terraform_rdns.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
resource "hcloud_rdns" "controlnode_ipv4" {
count = var.cluster_domain == "" ? 0 : length(hcloud_server.controlnode)
server_id = hcloud_server.controlnode[count.index].id
ip_address = hcloud_server.controlnode[count.index].ipv4_address
dns_ptr = hcloud_server.controlnode[count.index].name
}
resource "hcloud_rdns" "controlnode_ipv6" {
count = var.cluster_domain == "" ? 0 : length(hcloud_server.controlnode)
server_id = hcloud_server.controlnode[count.index].id
ip_address = hcloud_server.controlnode[count.index].ipv6_address
dns_ptr = hcloud_server.controlnode[count.index].name
}
resource "hcloud_rdns" "controllb_ipv4" {
count = var.cluster_domain == "" ? 0 : length(hcloud_load_balancer.controllb)
load_balancer_id = hcloud_load_balancer.controllb[count.index].id
ip_address = hcloud_load_balancer.controllb[count.index].ipv4
dns_ptr = hcloud_load_balancer.controllb[count.index].name
}
resource "hcloud_rdns" "controllb_ipv6" {
count = var.cluster_domain == "" ? 0 : length(hcloud_load_balancer.controllb)
load_balancer_id = hcloud_load_balancer.controllb[count.index].id
ip_address = hcloud_load_balancer.controllb[count.index].ipv6
dns_ptr = hcloud_load_balancer.controllb[count.index].name
}
resource "hcloud_rdns" "workernode_ipv4" {
count = var.cluster_domain == "" ? 0 : length(hcloud_server.workernode)
server_id = hcloud_server.workernode[count.index].id
ip_address = hcloud_server.workernode[count.index].ipv4_address
dns_ptr = hcloud_server.workernode[count.index].name
}
resource "hcloud_rdns" "workernode_ipv6" {
count = var.cluster_domain == "" ? 0 : length(hcloud_server.workernode)
server_id = hcloud_server.workernode[count.index].id
ip_address = hcloud_server.workernode[count.index].ipv6_address
dns_ptr = hcloud_server.workernode[count.index].name
}
resource "hcloud_rdns" "workerlb_ipv4" {
count = var.cluster_domain == "" ? 0 : length(hcloud_load_balancer.workerlb)
load_balancer_id = hcloud_load_balancer.workerlb[count.index].id
ip_address = hcloud_load_balancer.workerlb[count.index].ipv4
dns_ptr = hcloud_load_balancer.workerlb[count.index].name
}
resource "hcloud_rdns" "workerlb_ipv6" {
count = var.cluster_domain == "" ? 0 : length(hcloud_load_balancer.workerlb)
load_balancer_id = hcloud_load_balancer.workerlb[count.index].id
ip_address = hcloud_load_balancer.workerlb[count.index].ipv6
dns_ptr = hcloud_load_balancer.workerlb[count.index].name
}