From 452f94e3edf805e5c892dbc653231b5fa361287b Mon Sep 17 00:00:00 2001 From: Bohdan Tverdyi Date: Thu, 20 Oct 2022 17:05:55 +0300 Subject: [PATCH] Add node_ports outputs --- README.md | 11 ++++++----- outputs.tf | 5 +++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ffcda34..5d82c1b 100644 --- a/README.md +++ b/README.md @@ -56,8 +56,9 @@ module "service_jenkins_NP" { See in example directory & variables.tf ## Outputs -| Name | Description | -|------|:-----------:| -| name | Name of the service | -| namespace | Namespace in which created the service | -| id | Kubernetes resource id | \ No newline at end of file +| Name | Description | +|------------|:--------------------------------------:| +| name | Name of the service | +| namespace | Namespace in which created the service | +| id | Kubernetes resource id | +| node_ports | All Node Ports generated & entered | \ No newline at end of file diff --git a/outputs.tf b/outputs.tf index 2f13223..2be0f78 100644 --- a/outputs.tf +++ b/outputs.tf @@ -9,4 +9,9 @@ output "name" { } output "namespace" { value = kubernetes_service.service.metadata[0].namespace +} + +# Ports +output "node_ports" { + value = kubernetes_service.service.spec[0].port[*].node_port } \ No newline at end of file