From b68cb9cd961cee83cd1d48f4c0e68463167d621a Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 23 Apr 2023 20:26:11 +0100 Subject: [PATCH] Move 0rng.one DNS to Gandi --- terraform/0rng.one.tf | 60 ++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 26 deletions(-) diff --git a/terraform/0rng.one.tf b/terraform/0rng.one.tf index 4534b96..699c624 100644 --- a/terraform/0rng.one.tf +++ b/terraform/0rng.one.tf @@ -1,35 +1,43 @@ -resource "cloudflare_zone" "orngone" { - zone = "0rng.one" +resource "gandi_livedns_domain" "orngone" { + name = "0rng.one" } -resource "cloudflare_record" "orngone_git" { - zone_id = cloudflare_zone.orngone.id - name = "git" - value = cloudflare_record.theorangeonenet_git.hostname - type = "CNAME" - ttl = 1 +resource "gandi_livedns_record" "orngone_git" { + zone = gandi_livedns_domain.orngone.id + name = "git" + type = "CNAME" + ttl = 3600 + values = [ + cloudflare_record.theorangeonenet_git.hostname + ] } -resource "cloudflare_record" "orngone_who" { - zone_id = cloudflare_zone.orngone.id - name = "who" - value = cloudflare_record.theorangeonenet_whoami.hostname - type = "CNAME" - ttl = 1 +resource "gandi_livedns_record" "orngone_who" { + zone = gandi_livedns_domain.orngone.id + name = "who" + type = "CNAME" + ttl = 3600 + values = [ + cloudflare_record.theorangeonenet_whoami.hostname + ] } -resource "cloudflare_record" "orngone_img" { - zone_id = cloudflare_zone.orngone.id - name = "img" - value = cloudflare_record.theorangeonenet_img.hostname - type = "CNAME" - ttl = 1 +resource "gandi_livedns_record" "orngone_img" { + zone = gandi_livedns_domain.orngone.id + name = "img" + type = "CNAME" + ttl = 3600 + values = [ + cloudflare_record.theorangeonenet_img.hostname + ] } -resource "cloudflare_record" "orngone_yourls" { - zone_id = cloudflare_zone.orngone.id - name = "@" - value = linode_instance.casey.ip_address - type = "A" - ttl = 1 +resource "gandi_livedns_record" "orngone_apex" { + zone = gandi_livedns_domain.orngone.id + name = "@" + type = "A" + ttl = 3600 + values = [ + linode_instance.casey.ip_address + ] }