From 63f1f3e066daea0c2e73f0c4f3d21ed8e871145c Mon Sep 17 00:00:00 2001 From: Julio Castillo Date: Tue, 12 May 2020 19:17:46 +0200 Subject: [PATCH] Add cluster CA certificate as output for gke-cluster --- modules/gke-cluster/README.md | 1 + modules/gke-cluster/outputs.tf | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/modules/gke-cluster/README.md b/modules/gke-cluster/README.md index fcbae58f..e081bf70 100644 --- a/modules/gke-cluster/README.md +++ b/modules/gke-cluster/README.md @@ -70,6 +70,7 @@ module "cluster-1" { | name | description | sensitive | |---|---|:---:| +| ca_certificate | Public certificate of the cluster (base64-encoded). | ✓ | | cluster | Cluster resource. | ✓ | | endpoint | Cluster endpoint. | | | location | Cluster location. | | diff --git a/modules/gke-cluster/outputs.tf b/modules/gke-cluster/outputs.tf index 6937ee96..cb19e92d 100644 --- a/modules/gke-cluster/outputs.tf +++ b/modules/gke-cluster/outputs.tf @@ -39,3 +39,9 @@ output "name" { description = "Cluster name." value = google_container_cluster.cluster.name } + +output "ca_certificate" { + description = "Public certificate of the cluster (base64-encoded)." + value = google_container_cluster.cluster.master_auth.0.cluster_ca_certificate + sensitive = true +}