2026-02-28 20:24:55 +00:00
|
|
|
output "control_plane_ips" {
|
|
|
|
|
description = "Public IPs of control plane nodes"
|
|
|
|
|
value = [for cp in hcloud_server.control_plane : cp.ipv4_address]
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-01 04:04:56 +00:00
|
|
|
output "control_plane_names" {
|
|
|
|
|
description = "Control plane hostnames"
|
|
|
|
|
value = [for cp in hcloud_server.control_plane : cp.name]
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 20:24:55 +00:00
|
|
|
output "control_plane_private_ips" {
|
|
|
|
|
description = "Private IPs of control plane nodes"
|
2026-02-28 21:29:13 +00:00
|
|
|
value = [for cp in hcloud_server.control_plane : one(cp.network).ip]
|
2026-02-28 20:24:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
output "primary_control_plane_ip" {
|
|
|
|
|
description = "Public IP of the primary control plane (first node)"
|
|
|
|
|
value = hcloud_server.control_plane[0].ipv4_address
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
output "worker_ips" {
|
|
|
|
|
description = "Public IPs of worker nodes"
|
|
|
|
|
value = [for worker in hcloud_server.workers : worker.ipv4_address]
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-01 04:04:56 +00:00
|
|
|
output "worker_names" {
|
|
|
|
|
description = "Worker hostnames"
|
|
|
|
|
value = [for worker in hcloud_server.workers : worker.name]
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 20:24:55 +00:00
|
|
|
output "worker_private_ips" {
|
|
|
|
|
description = "Private IPs of worker nodes"
|
2026-02-28 21:29:13 +00:00
|
|
|
value = [for worker in hcloud_server.workers : one(worker.network).ip]
|
2026-02-28 20:24:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
output "ssh_private_key_path" {
|
|
|
|
|
description = "Path to SSH private key"
|
|
|
|
|
value = var.ssh_private_key
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
output "cluster_name" {
|
|
|
|
|
description = "Cluster name"
|
|
|
|
|
value = var.cluster_name
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-01 04:04:56 +00:00
|
|
|
output "tailscale_tailnet" {
|
|
|
|
|
description = "Tailnet domain suffix"
|
|
|
|
|
value = var.tailscale_tailnet
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 20:24:55 +00:00
|
|
|
output "network_cidr" {
|
|
|
|
|
description = "Private network CIDR"
|
|
|
|
|
value = var.subnet_cidr
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
output "kubeconfig_command" {
|
|
|
|
|
description = "Command to fetch kubeconfig"
|
|
|
|
|
value = "ssh root@${hcloud_server.control_plane[0].ipv4_address} 'cat /etc/rancher/k3s/k3s.yaml' > kubeconfig && sed -i 's/127.0.0.1/${hcloud_server.control_plane[0].ipv4_address}/g' kubeconfig"
|
|
|
|
|
}
|