change: Add outputs for all worker nodes as well

This commit is contained in:
2025-08-03 15:21:17 +02:00
parent 0a851ca2aa
commit 8a4f2c6e1c
2 changed files with 16 additions and 0 deletions
@@ -8,4 +8,16 @@ output "node_details" {
ipv6 = instance.ipv6_address ipv6 = instance.ipv6_address
} }
} }
}
output "worker_node_details" {
value = {
for idx, instance in hcloud_server.worker_node :
"worker-node-${idx}" => {
id = instance.id
name = instance.name
ipv4 = instance.ipv4_address
ipv6 = instance.ipv6_address
}
}
} }
+4
View File
@@ -9,4 +9,8 @@
output "swarm_nodes" { output "swarm_nodes" {
value = module.test_swarm_cluster.node_details value = module.test_swarm_cluster.node_details
}
output "swarm_worker_nodes" {
value = module.test_swarm_cluster.worker_node_details
} }