hcloud-server-tf/data.tf
Robert Kaussow 810cf272b8
All checks were successful
continuous-integration/drone/push Build is passing
feat: add option to set univention dns records
2022-09-03 23:12:06 +02:00

19 lines
419 B
HCL

data "cloudflare_zones" "zones" {
for_each = toset(try(var.cloudflare_zones, []))
filter {
name = each.key
status = "active"
}
}
data "restapi_object" "ucs_zones" {
for_each = toset(try(var.ucs_zones, []))
query_string = "filter=univentionObjectType=dns/forward_zone"
path = "/dns/forward_zone/"
search_key = "id"
search_value = each.key
results_key = "_embedded/udm:object"
}