resource "aws_route53_record" "ui" {
  zone_id = "${var.datasaker-io}"
  name    = "app.kr.datasaker.io"
  type    = "A"
  alias {
    name    = aws_alb.nlb-prod-kr-ingress.dns_name
    zone_id = aws_alb.nlb-prod-kr-ingress.zone_id
    evaluate_target_health = true
  }
}

resource "aws_route53_record" "krakend" {
  zone_id = "${var.datasaker-io}"
  name    = "api.kr.datasaker.io"
  type    = "A"
  alias {
    name    = aws_alb.nlb-prod-kr-ingress.dns_name
    zone_id = aws_alb.nlb-prod-kr-ingress.zone_id
    evaluate_target_health = true
  }
}

resource "aws_route53_record" "keycloak" {
  zone_id = "${var.datasaker-io}"
  name    = "auth.kr.datasaker.io"
  type    = "A"
  alias {
    name    = aws_alb.nlb-prod-kr-ingress.dns_name
    zone_id = aws_alb.nlb-prod-kr-ingress.zone_id
    evaluate_target_health = true
  }
}

resource "aws_route53_record" "datagate" {
  zone_id = "${var.datasaker-io}"
  name    = "gate.kr.datasaker.io"
  type    = "A"
  alias {
    name    = aws_alb.nlb-prod-kr-ingress.dns_name
    zone_id = aws_alb.nlb-prod-kr-ingress.zone_id
    evaluate_target_health = true
  }
}

resource "aws_route53_record" "release_ui" {
  zone_id = "${var.datasaker-io}"
  name    = "app.rel.kr.datasaker.io"
  type    = "A"
  alias {
    name    = aws_alb.nlb-prod-kr-ingress.dns_name
    zone_id = aws_alb.nlb-prod-kr-ingress.zone_id
    evaluate_target_health = true
  }
}
resource "aws_route53_record" "release_krakend" {
  zone_id = "${var.datasaker-io}"
  name    = "api.rel.kr.datasaker.io"
  type    = "A"
  alias {
    name    = aws_alb.nlb-prod-kr-ingress.dns_name
    zone_id = aws_alb.nlb-prod-kr-ingress.zone_id
    evaluate_target_health = true
  }
}
resource "aws_route53_record" "release_datagate" {
  zone_id = "${var.datasaker-io}"
  name    = "gate.rel.kr.datasaker.io"
  type    = "A"
  alias {
    name    = aws_alb.nlb-prod-kr-ingress.dns_name
    zone_id = aws_alb.nlb-prod-kr-ingress.zone_id
    evaluate_target_health = true
  }
}
resource "aws_route53_record" "druid_route" {
  zone_id = "${var.datasaker-io}"
  name    = "druid2.kr.datasaker.io"
  type    = "A"
  alias {
    name    = aws_alb.nlb-prod-kr-ingress.dns_name
    zone_id = aws_alb.nlb-prod-kr-ingress.zone_id
    evaluate_target_health = true
  }
}
