# Nomad 多数据中心生产环境输出

output "cluster_overview" {
  description = "Nomad 多数据中心集群概览"
  value       = module.nomad_cluster.cluster_overview
}

output "cluster_endpoints" {
  description = "集群连接端点"
  value       = module.nomad_cluster.cluster_endpoints
}

output "oracle_korea_node" {
  description = "Oracle Cloud 韩国节点信息"
  value       = module.nomad_cluster.oracle_korea_node
}

output "huawei_us_node" {
  description = "华为云美国节点信息"
  value       = module.nomad_cluster.huawei_us_node
}

output "deployment_summary" {
  description = "部署摘要"
  value = {
    total_nodes = module.nomad_cluster.cluster_overview.total_nodes
    datacenters = keys(module.nomad_cluster.cluster_overview.datacenters)
    
    next_steps = [
      "1. 等待所有节点启动完成 (约 5-10 分钟)",
      "2. 运行: ./generated/post-deploy.sh",
      "3. 验证集群: nomad server members",
      "4. 测试跨 DC 调度: nomad job run generated/cross-dc-test.nomad",
      "5. 访问 Web UI 查看集群状态"
    ]
    
    web_ui_urls = module.nomad_cluster.cluster_endpoints.nomad_ui_urls
    
    ssh_commands = module.nomad_cluster.cluster_endpoints.ssh_commands
  }
}

output "verification_commands" {
  description = "验证命令"
  value       = module.nomad_cluster.verification_commands
}