resource "aws_route53_record" "dns" {
  count = var.enabled ? 1 : 0

  name = var.name
  type = "A"
  zone_id = var.dns_info["public"]["zone_id"]

  alias {
    name                   = var.target_dns_name
    zone_id                = var.target_zone_id
    evaluate_target_health = false #don't care, return an answer regardless
  }

  provider = aws.mdr-common-services-commercial
}
