Difference between revisions of "Template:Cloudflare zones django example"
Jump to navigation
Jump to search
(Created page with " data "cloudflare_zones" "zones" { filter {} } locals { zones = {for zone in data.cloudflare_zones.zones.zones : zone.name => zone.id} } resource "cloudflare_rec...") |
|||
Line 1: | Line 1: | ||
− | data "cloudflare_zones" "zones" { | + | data "[[cloudflare_zones]]" "zones" { |
filter {} | filter {} | ||
} | } |
Latest revision as of 11:28, 8 March 2024
data "cloudflare_zones" "zones" { filter {} } locals { zones = {for zone in data.cloudflare_zones.zones.zones : zone.name => zone.id} } resource "cloudflare_record" "record" { for_each = var.records name = each.key type = each.value.type value = each.value.value proxied = each.value.proxied zone_id = lookup(local.zones, regex(".*?([^.]+\\.[^.]+)$", each.key)[0]) lifecycle { ignore_changes = [zone_id] } }
Advertising: