add CloudFlare zone access boilerplate

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2022-06-20 13:17:13 +02:00
parent 2f11233f7c
commit 8c63394bbe
No known key found for this signature in database
GPG Key ID: 09AA5403E54D9931
1 changed files with 15 additions and 0 deletions

15
main.tf
View File

@ -14,3 +14,18 @@ terraform {
key_file = "ansible/files/consul-client.key" key_file = "ansible/files/consul-client.key"
} }
} }
/* 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 = {
for zone in data.cloudflare_zones.active.zones :
zone.name => zone.id
}
}