kubernetes-init/modules/cloudflare/main.tf
2022-05-08 15:51:41 +02:00

25 lines
417 B
HCL

terraform {
required_providers {
cloudflare = {
source = "cloudflare/cloudflare"
version = "~> 3.0"
}
}
}
provider "cloudflare" {
api_token = var.api_token
}
resource "cloudflare_record" "exact" {
zone_id = var.zone_id
for_each = { for record in var.records : record.name => record }
name = each.value.name
value = each.value.ip
type = each.value.ip_type
ttl = 3600
}