From c86d8287da74e82a82945b2e07fbabf07ffccc45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Masset?= Date: Tue, 25 Jan 2022 15:16:52 +0100 Subject: [PATCH] Added public/private LB IPs to module outputs --- README.md | 4 ++++ outputs.tf | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 outputs.tf diff --git a/README.md b/README.md index c93eb36..e45a743 100644 --- a/README.md +++ b/README.md @@ -303,3 +303,7 @@ inputs = { ## Outputs +| Name | Description +|------------|------------ +| public_ip | The LB public IP +| private_ip | The LB private IP diff --git a/outputs.tf b/outputs.tf new file mode 100644 index 0000000..5e67a9d --- /dev/null +++ b/outputs.tf @@ -0,0 +1,9 @@ +output "public_ip" { + description = "The LB public IP" + value = var.bind_eip ? var.eip_addr == null ? flexibleengine_networking_floatingip_v2.loadbalancer_eip[0].address : var.eip_addr : null +} + +output "private_ip" { + description = "The LB private IP" + value = flexibleengine_lb_loadbalancer_v2.loadbalancer.vip_address +}