From fa16d54735a69b38a158fa48bc60990b106922df Mon Sep 17 00:00:00 2001 From: shane Date: Thu, 9 Feb 2023 21:56:00 -0600 Subject: [PATCH] Re-add NameCheap main record --- backend/main.tf | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/backend/main.tf b/backend/main.tf index 21bd350..c1df808 100644 --- a/backend/main.tf +++ b/backend/main.tf @@ -71,22 +71,15 @@ output "cdn_origin" { value = digitalocean_cdn.distrust_co.origin } -# # Handle record for distrust.co -# resource "digitalocean_record" "distrust_co-cdn" { -# domain = digitalocean_domain.default.name -# type = "CNAME" -# name = "@" -# value = "${digitalocean_cdn.distrust_co.origin}." -# depends_on = [ -# digitalocean_cdn.distrust_co -# ] -# } - -resource "digitalocean_record" "CNAME-www" { +# Handle record for distrust.co +resource "digitalocean_record" "distrust_co-cdn" { domain = digitalocean_domain.default.name type = "CNAME" - name = "www-main" - value = "@" + name = "@" + value = "${digitalocean_cdn.distrust_co.origin}." + depends_on = [ + digitalocean_cdn.distrust_co + ] } # NameCheap Records @@ -106,16 +99,16 @@ resource "digitalocean_record" "billing" { resource "digitalocean_record" "chat" { domain = digitalocean_domain.default.id - type = "A" + type = "CNAME" name = "chat" - value = "143.198.235.76" + value = "distrust.element.io." } resource "digitalocean_record" "www" { domain = digitalocean_domain.default.id - type = "A" + type = "CNAME" name = "www" - value = "143.198.235.76" + value = "${digitalocean_domain.default.id}." } # Mail records