2021-02-17 17:25:06 +00:00
|
|
|
/* DATA -----------------------------------------*/
|
|
|
|
|
|
|
|
terraform {
|
|
|
|
backend "consul" {
|
|
|
|
address = "https://consul.statusim.net:8400"
|
2021-06-23 10:53:26 +00:00
|
|
|
lock = true /* Lock to avoid syncing issues */
|
|
|
|
gzip = true /* KV store has a limit of 512KB */
|
2021-02-17 17:25:06 +00:00
|
|
|
/* WARNING This needs to be changed for every repo. */
|
|
|
|
path = "terraform/avalanche/"
|
|
|
|
ca_file = "ansible/files/consul-ca.crt"
|
|
|
|
cert_file = "ansible/files/consul-client.crt"
|
|
|
|
key_file = "ansible/files/consul-client.key"
|
|
|
|
}
|
|
|
|
}
|
2021-02-22 14:14:33 +00:00
|
|
|
|
|
|
|
/* CF Zones ------------------------------------*/
|
|
|
|
|
|
|
|
/* CloudFlare Zone IDs required for records */
|
|
|
|
data "cloudflare_zones" "active" {
|
|
|
|
filter { status = "active" }
|
|
|
|
}
|
|
|
|
|
|
|
|
/* For easier access to zone ID by domain name */
|
|
|
|
locals {
|
|
|
|
zones = {
|
2021-06-23 10:53:26 +00:00
|
|
|
for zone in data.cloudflare_zones.active.zones :
|
|
|
|
zone.name => zone.id
|
2021-02-22 14:14:33 +00:00
|
|
|
}
|
|
|
|
}
|