From 1920af5bc4e44479d0a48d2beb9d7e82398671b3 Mon Sep 17 00:00:00 2001 From: Von Random <von@mechanus.net> Date: Wed, 12 Feb 2025 19:09:53 +0200 Subject: [PATCH] prettier output --- terraform/output.tf | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/terraform/output.tf b/terraform/output.tf index 3c58075..8f1b5b0 100644 --- a/terraform/output.tf +++ b/terraform/output.tf @@ -1,3 +1,13 @@ -output "lb-ip" { - value = yandex_lb_network_load_balancer.balancer1.listener +output "vms" { + value = { + for name, vm in yandex_compute_instance.vm : vm.name => vm.network_interface.0.nat_ip_address + } +} + +output "lbs" { + value = { + for listener in yandex_lb_network_load_balancer.balancer1.listener : listener.name => [ + for spec in listener.external_address_spec : spec.address + ] + } }