diff options
author | clyhtsuriva <aimeric@adjutor.xyz> | 2025-02-03 13:01:33 +0100 |
---|---|---|
committer | clyhtsuriva <aimeric@adjutor.xyz> | 2025-02-03 13:01:33 +0100 |
commit | d26133790a82e30955aeaa0327a30616788b9aee (patch) | |
tree | bab75464255b3d92377398cdc8ec530d6f1758a4 /opentofu/outputs.tf | |
parent | cbe1116f9ea9c4b1c0e66125070d33236fe0bbc6 (diff) |
opentofu: main becomes docker-server, starting ubuntu and k8s cluster template
Diffstat (limited to 'opentofu/outputs.tf')
-rw-r--r-- | opentofu/outputs.tf | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/opentofu/outputs.tf b/opentofu/outputs.tf index 49e86c5..7779a10 100644 --- a/opentofu/outputs.tf +++ b/opentofu/outputs.tf @@ -1,4 +1,13 @@ -output "vm_ip" { - description = "IP address of the provisioned VM" - value = proxmox_vm_qemu.docker_server.default_ipv4_address +locals { + all_vms = flatten([ + [proxmox_vm_qemu.k8s_cp], + proxmox_vm_qemu.k8s_worker, + [proxmox_vm_qemu.docker_server], + [proxmox_vm_qemu.ubuntu_server_noble] + ]) +} + +output "vm_ips" { + description = "Mapping of VM names to their IP addresses" + value = { for vm in local.all_vms : vm.name => vm.default_ipv4_address if can(vm.default_ipv4_address) } } |