terraform-oci-freestuff/dns.tf
2022-12-03 14:54:36 +01:00

22 lines
516 B
HCL

resource "cloudflare_record" "dns_a1_flex" {
for_each = var.a1_flex
zone_id = var.cloudflare_zone_id
name = "${each.key}.${var.base_domain}"
value = oci_core_instance.a1_flex_instances[each.key].public_ip
type = "A"
ttl = 1 # For automatic
}
resource "cloudflare_record" "dns_e2_micro" {
for_each = var.e2_micro
zone_id = var.cloudflare_zone_id
name = "${each.key}.${var.base_domain}"
value = oci_core_instance.e2_micro_instances[each.key].public_ip
type = "A"
ttl = 1 # For automatic
}