terraform-oci-freestuff/dns.tf

22 lines
516 B
Terraform
Raw Normal View History

2022-12-03 13:54:36 +00:00
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
}