output "launch_template_ids" {
  description = "Map of instance name to launch template ID"
  value = {
    for k, v in aws_launch_template.ec2 : k => v.id
  }
}

output "autoscaling_group_names" {
  description = "Map of instance name to autoscaling group name"
  value = {
    for k, v in aws_autoscaling_group.ec2 : k => v.name
  }
}

output "server_artifacts_bucket" {
  description = "S3 bucket name for server artifacts"
  value       = aws_s3_bucket.server_artifacts.bucket
}

output "iam_role_name" {
  description = "IAM role name for EC2 instances"
  value       = aws_iam_role.server_role.name
}

output "target_group_arns" {
  description = "Map of instance name to target group ARN"
  value = {
    for k, v in aws_lb_target_group.ec2 : k => v.arn
  }
}

output "instance_ids" {
  description = "Map of instance name to EC2 instance ID"
  value = {
    for k, v in aws_instance.ec2 : k => v.id
  }
}
