output "alb_id" {
  description = "ID of the Application Load Balancer"
  value       = aws_lb.main.id
}

output "alb_arn" {
  description = "ARN of the Application Load Balancer"
  value       = aws_lb.main.arn
}

output "alb_dns_name" {
  description = "DNS name of the Application Load Balancer (for CNAME/alias records)"
  value       = aws_lb.main.dns_name
}

output "alb_zone_id" {
  description = "Route53 hosted zone ID for alias records to the ALB"
  value       = aws_lb.main.zone_id
}

output "security_group_id" {
  description = "Security group ID associated with the ALB"
  value       = aws_security_group.alb.id
}

{% for service in services %}
output "{{ service.name | replace('-', '_') }}_target_group_arn" {
  description = "ARN of the ALB target group for the {{ service.name }} service"
  value       = aws_lb_target_group.{{ service.name }}.arn
}
{% endfor %}
