flipping dns over to the vultr host
This commit is contained in:
parent
485890e961
commit
31f558c4bf
@ -34,8 +34,8 @@ locals {
|
|||||||
ttl = 300
|
ttl = 300
|
||||||
records = [ "v=spf1 include:_mailcust.gandi.net ?all" ]
|
records = [ "v=spf1 include:_mailcust.gandi.net ?all" ]
|
||||||
},
|
},
|
||||||
{ name = "www.shockrah.xyz", records = [ var.alpha.dns ] },
|
{ name = "www.shockrah.xyz", records = [ var.vultr_host ] },
|
||||||
{ name = "resume.shockrah.xyz", records = [ var.alpha.dns ] },
|
{ 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
|
zone_id = aws_route53_zone.shockrah-xyz.id
|
||||||
name = each.value.name
|
name = each.value.name
|
||||||
type = lookup(each.value, "type", "CNAME")
|
type = lookup(each.value, "type", "A")
|
||||||
ttl = lookup(each.value, "ttl", 300)
|
ttl = lookup(each.value, "ttl", 300)
|
||||||
records = each.value.records
|
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_
|
# 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
|
# 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
|
# 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
|
zone_id = aws_route53_zone.shockrah-xyz.id
|
||||||
name = "shockrah.xyz"
|
name = "shockrah.xyz"
|
||||||
type = "A"
|
type = "A"
|
||||||
|
ttl = 300
|
||||||
alias {
|
records = [ "45.32.83.83" ]
|
||||||
name = var.alpha.dns
|
|
||||||
zone_id = var.alpha.zone
|
|
||||||
evaluate_target_health = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,17 +3,13 @@ resource "aws_route53_zone" "temper-tv" {
|
|||||||
comment = "Main zone for 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" {
|
resource "aws_route53_record" "temper-tv" {
|
||||||
zone_id = aws_route53_zone.temper-tv.id
|
zone_id = aws_route53_zone.temper-tv.id
|
||||||
name = "temper.tv"
|
name = "temper.tv"
|
||||||
type = "A"
|
type = "A"
|
||||||
|
ttl = 300
|
||||||
alias {
|
records = [ var.vultr_host ]
|
||||||
name = var.alpha.dns
|
|
||||||
zone_id = var.alpha.zone
|
|
||||||
evaluate_target_health = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# For email later down the line
|
# 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