52 lines
1.7 KiB
HCL
52 lines
1.7 KiB
HCL
# Output the floating IPs for easier access
|
|
output "talos_ikt210_g04_floatingip_0" {
|
|
value = openstack_networking_floatingip_v2.talos_ikt210_g04_floatingip[0].address
|
|
description = "Floating IP of the first control plane node"
|
|
}
|
|
|
|
output "talos_ikt210_g04_floatingip_1" {
|
|
value = openstack_networking_floatingip_v2.talos_ikt210_g04_floatingip[1].address
|
|
description = "Floating IP of the second control plane node"
|
|
}
|
|
|
|
output "talos_ikt210_g04_floatingip_2" {
|
|
value = openstack_networking_floatingip_v2.talos_ikt210_g04_floatingip[2].address
|
|
description = "Floating IP of the third control plane node"
|
|
}
|
|
|
|
output "controlplane_ips" {
|
|
value = {
|
|
for idx, instance in openstack_compute_instance_v2.cp :
|
|
instance.name => {
|
|
fixed_ip = instance.network[0].fixed_ip_v4
|
|
floating_ip = openstack_networking_floatingip_v2.talos_ikt210_g04_floatingip[idx].address
|
|
}
|
|
}
|
|
description = "All IPs of the control plane nodes"
|
|
}
|
|
|
|
output "worker_ips" {
|
|
value = {
|
|
for idx, instance in openstack_compute_instance_v2.worker :
|
|
instance.name => {
|
|
fixed_ip = instance.network[0].fixed_ip_v4
|
|
}
|
|
}
|
|
description = "Fixed IPs of the worker nodes"
|
|
}
|
|
|
|
output "worker_volumes" {
|
|
value = {
|
|
for idx, volume in openstack_blockstorage_volume_v3.worker_volume :
|
|
volume.name => {
|
|
volume_id = volume.id
|
|
size = "${volume.size}GB"
|
|
instance_id = openstack_compute_instance_v2.worker[idx].id
|
|
instance_name = openstack_compute_instance_v2.worker[idx].name
|
|
attachment_id = openstack_compute_volume_attach_v2.worker_volume_attach[idx].id
|
|
device = openstack_compute_volume_attach_v2.worker_volume_attach[idx].device
|
|
}
|
|
}
|
|
description = "Volume attachments for worker nodes"
|
|
}
|