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