terraform-oci-freestuff/dns.tf

22 lines
524 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
2022-12-03 14:06:26 +00:00
name = "${each.key}.${var.base_domain}"
2022-12-03 13:54:36 +00:00
value = oci_core_instance.a1_flex_instances[each.key].public_ip
2022-12-03 14:06:26 +00:00
type = "A"
ttl = 1 # For automatic
2022-12-03 13:54:36 +00:00
}
resource "cloudflare_record" "dns_e2_micro" {
for_each = var.e2_micro
zone_id = var.cloudflare_zone_id
2022-12-03 14:06:26 +00:00
name = "${each.key}.${var.base_domain}"
2022-12-03 13:54:36 +00:00
value = oci_core_instance.e2_micro_instances[each.key].public_ip
2022-12-03 14:06:26 +00:00
type = "A"
ttl = 1 # For automatic
2022-12-03 13:54:36 +00:00
}