From 18ff03373fdf198e0c87b107094374101225e880 Mon Sep 17 00:00:00 2001 From: Praise Adanlawo Date: Thu, 20 Jan 2022 17:16:37 +0100 Subject: [PATCH] fix: modified private and public endpoint outputs (#2) --- outputs.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/outputs.tf b/outputs.tf index 03f90d5..e667501 100644 --- a/outputs.tf +++ b/outputs.tf @@ -20,13 +20,13 @@ output "endpoint" { output "private_endpoint" { description = "The Private IP address of the cluster master." sensitive = true - value = google_container_cluster.cluster.private_cluster_config.0.private_endpoint + value = var.disable_public_endpoint || var.enable_private_nodes ? google_container_cluster.cluster.private_cluster_config.0.private_endpoint : null } output "public_endpoint" { description = "The Public IP address of the cluster master." sensitive = true - value = google_container_cluster.cluster.private_cluster_config.0.public_endpoint + value = var.disable_public_endpoint || var.enable_private_nodes ? google_container_cluster.cluster.private_cluster_config.0.public_endpoint : google_container_cluster.cluster.endpoint } # The following outputs allow authentication and connectivity to the GKE Cluster.