# Outputs ======================================================================

output "id" {
  description = "EFS file system ID."
  value       = aws_efs_file_system.this.id
}

output "arn" {
  description = "EFS file system ARN."
  value       = aws_efs_file_system.this.arn
}

output "dns_name" {
  description = "EFS DNS name. Use this as the mount target from Linux instances."
  value       = aws_efs_file_system.this.dns_name
}

output "security_group_id" {
  description = "ID of the EFS security group. Reference this from other modules that need mount access."
  value       = aws_security_group.efs.id
}

output "mount_target_ids" {
  description = "Map of subnet index to mount target ID."
  value       = { for k, v in aws_efs_mount_target.this : k => v.id }
}

output "access_point_ids" {
  description = "Map of access point logical key to ID."
  value       = { for k, v in aws_efs_access_point.this : k => v.id }
}

output "access_point_arns" {
  description = "Map of access point logical key to ARN."
  value       = { for k, v in aws_efs_access_point.this : k => v.arn }
}
