# outputs =====================================================================

output "cluster_ids" {
  description = "Map of cluster keys to Redshift cluster identifiers"
  value       = { for k, v in aws_redshift_cluster.this : k => v.id }
}

output "cluster_arns" {
  description = "Map of cluster keys to Redshift cluster ARNs"
  value       = { for k, v in aws_redshift_cluster.this : k => v.arn }
}

output "cluster_endpoints" {
  description = "Map of cluster keys to Redshift cluster endpoints"
  value       = { for k, v in aws_redshift_cluster.this : k => v.endpoint }
}

output "cluster_dns_names" {
  description = "Map of cluster keys to Redshift cluster DNS names"
  value       = { for k, v in aws_redshift_cluster.this : k => v.dns_name }
}

output "cluster_ports" {
  description = "Map of cluster keys to Redshift cluster ports"
  value       = { for k, v in aws_redshift_cluster.this : k => v.port }
}

output "master_password_secret_arns" {
  description = "Map of cluster keys to ARNs of the managed master password Secrets Manager secrets"
  value       = { for k, v in aws_redshift_cluster.this : k => v.master_password_secret_arn }
}

output "subnet_group_ids" {
  description = "Map of subnet group keys to Redshift subnet group IDs"
  value       = { for k, v in aws_redshift_subnet_group.this : k => v.id }
}

output "parameter_group_ids" {
  description = "Map of parameter group keys to Redshift parameter group IDs"
  value       = { for k, v in aws_redshift_parameter_group.this : k => v.id }
}
