Im having trouble trying to change my current aws_route53_record that has a web app, Im trying to decouple it and use a s3 static site, I’m trying the following
resource "aws_route53_zone" "site_zone" {
name = "${var.site_name}"
}
resource "aws_route53_record" "site_cname" {
zone_id = "${aws_route53_zone.site_zone.zone_id}"
name = "${var.site_name}"
type = "NS"
ttl = "30"
records = [
"${aws_route53_zone.site_zone.name_servers.0}",
"${aws_route53_zone.site_zone.name_servers.1}",
"${aws_route53_zone.site_zone.name_servers.2}",
"${aws_route53_zone.site_zone.name_servers.3}"
]
}
And my current config is
resource "aws_route53_record" "www-prod" {
zone_id = aws_route53_zone.primary_route.id
name = var.domain
type = "A"
alias {
name = var.ecs-frontend-alb-dns-name
zone_id = var.ecs-frontend-alb-dns-zone-id
evaluate_target_health = true
}
}
is there anything I missed?
Thanks for the help!