-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata.tf
35 lines (29 loc) · 897 Bytes
/
data.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
data "cloudinit_config" "lb" {
gzip = false
base64_encode = false
part {
content_type = "text/cloud-config"
content = templatefile("${path.module}/files/cloud-init/lb-cloud-init.tftpl.yml", {
haproxy_config = templatefile("${path.module}/files/configs/haproxy.tftpl.cfg", {
controllers = [for instance in module.control_plane : {
name = instance.access_ip_v4
addr = instance.access_ip_v4
}]
})
})
}
part {
filename = "lb-cloud-init.sh"
content_type = "text/x-shellscript"
content = file("${path.module}/files/scripts/lb-cloud-init.sh")
}
}
data "cloudinit_config" "worker" {
gzip = false
base64_encode = false
part {
filename = "worker-cloud-init.sh"
content_type = "text/x-shellscript"
content = file("${path.module}/files/scripts/worker-cloud-init.sh")
}
}