flipping dns over to the vultr host
This commit is contained in:
parent
485890e961
commit
31f558c4bf
@ -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" ]
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -28,4 +28,8 @@ variable "alpha" {
|
||||
})
|
||||
}
|
||||
|
||||
variable "vultr_host" {
|
||||
type = string
|
||||
description = "IP of the temp Vultr host"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user