mirror of
https://github.com/2martens/terraform.git
synced 2026-10-17 16:06:52 +02:00
change: Add outputs for all worker nodes as well
This commit is contained in:
@@ -9,3 +9,15 @@ output "node_details" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,3 +10,7 @@
|
|||||||
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
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user