diff --git a/infra/dns/temper-tv.tf b/infra/dns/temper-tv.tf new file mode 100644 index 0000000..19736cf --- /dev/null +++ b/infra/dns/temper-tv.tf @@ -0,0 +1,29 @@ +resource "aws_route53_zone" "temper-tv" { + name = "temper.tv" + comment = "Main zone for temper.tv" +} + +# Main entry which points to Alpha LB +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 + } +} + +# For email later down the line +resource "aws_route53_record" "temper-tv-txt" { + zone_id = aws_route53_zone.temper-tv.id + name = "temper.tv" + type = "TXT" + ttl = 300 + records = [ + "v=spf1 include:_mailcust.gandi.net ?all" + ] +} +