From 31f558c4bf5e1d692a32db64efb11f18cf9a99a2 Mon Sep 17 00:00:00 2001 From: shockrah Date: Sun, 28 Apr 2024 21:23:45 -0700 Subject: [PATCH] flipping dns over to the vultr host --- infra/dns/shockrah-xyz.tf | 23 ++++++++--------------- infra/dns/temper-tv.tf | 10 +++------- infra/dns/variables.tf | 4 ++++ 3 files changed, 15 insertions(+), 22 deletions(-) diff --git a/infra/dns/shockrah-xyz.tf b/infra/dns/shockrah-xyz.tf index c7ac9f9..d936522 100644 --- a/infra/dns/shockrah-xyz.tf +++ b/infra/dns/shockrah-xyz.tf @@ -34,8 +34,8 @@ locals { ttl = 300 records = [ "v=spf1 include:_mailcust.gandi.net ?all" ] }, - { name = "www.shockrah.xyz", records = [ var.alpha.dns ] }, - { name = "resume.shockrah.xyz", records = [ var.alpha.dns ] }, + { name = "www.shockrah.xyz", records = [ var.vultr_host ] }, + { name = "resume.shockrah.xyz", records = [ var.vultr_host ] }, ] } @@ -47,7 +47,7 @@ resource "aws_route53_record" "shockrah-xyz-record" { zone_id = aws_route53_zone.shockrah-xyz.id name = each.value.name - type = lookup(each.value, "type", "CNAME") + type = lookup(each.value, "type", "A") ttl = lookup(each.value, "ttl", 300) records = each.value.records } @@ -56,17 +56,10 @@ resource "aws_route53_record" "shockrah-xyz-record" { # domain to a alias which normally is not allowed however route53 _does_ # allow this to happen. In basically every other case we would need to point # this root record to an IP and have an LB attach to that LB -resource "aws_route53_record" "shockrah-xyz-apex" { +resource "aws_route53_record" "shockrah-xyz-vultr" { zone_id = aws_route53_zone.shockrah-xyz.id - name = "shockrah.xyz" - type = "A" - - alias { - name = var.alpha.dns - zone_id = var.alpha.zone - evaluate_target_health = true - } + name = "shockrah.xyz" + type = "A" + ttl = 300 + records = [ "45.32.83.83" ] } - - - diff --git a/infra/dns/temper-tv.tf b/infra/dns/temper-tv.tf index a6b4dc8..70bab8e 100644 --- a/infra/dns/temper-tv.tf +++ b/infra/dns/temper-tv.tf @@ -3,17 +3,13 @@ resource "aws_route53_zone" "temper-tv" { comment = "Main zone for temper.tv" } -# Main entry which points to Alpha LB +# Main entry which points to vultr host for now resource "aws_route53_record" "temper-tv" { zone_id = aws_route53_zone.temper-tv.id name = "temper.tv" type = "A" - - alias { - name = var.alpha.dns - zone_id = var.alpha.zone - evaluate_target_health = true - } + ttl = 300 + records = [ var.vultr_host ] } # For email later down the line diff --git a/infra/dns/variables.tf b/infra/dns/variables.tf index f3e5fd9..e6c4e66 100644 --- a/infra/dns/variables.tf +++ b/infra/dns/variables.tf @@ -28,4 +28,8 @@ variable "alpha" { }) } +variable "vultr_host" { + type = string + description = "IP of the temp Vultr host" +}