From 8cf605f23e971f0f2ba9fca10c1dff395c5f4c1a Mon Sep 17 00:00:00 2001 From: Aeneas Date: Thu, 2 Nov 2017 18:11:12 +0100 Subject: [PATCH] Document that GKE master_auth key is an array (#617) * Document that GKE master_auth key is an array This resolves https://github.com/hashicorp/terraform/issues/16417 and is a follow up to https://github.com/hashicorp/terraform/issues/14073 * Update container_cluster.html.markdown * Update container_cluster.html.markdown * Update container_cluster.html.markdown --- .../docs/r/container_cluster.html.markdown | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/website/docs/r/container_cluster.html.markdown b/website/docs/r/container_cluster.html.markdown index ba8d1a09..897273c7 100644 --- a/website/docs/r/container_cluster.html.markdown +++ b/website/docs/r/container_cluster.html.markdown @@ -49,6 +49,19 @@ resource "google_container_cluster" "primary" { tags = ["foo", "bar"] } } + +# The following outputs allow authentication and connectivity to the Google Container Cluster. +output "client_certificate" { + value = "${google_container_cluster.primary.master_auth.0.client_certificate}" +} + +output "client_key" { + value = "${google_container_cluster.primary.master_auth.0.client_key}" +} + +output "cluster_ca_certificate" { + value = "${google_container_cluster.primary.master_auth.0.cluster_ca_certificate}" +} ``` ## Argument Reference @@ -214,13 +227,13 @@ exported: * `instance_group_urls` - List of instance group URLs which have been assigned to the cluster. -* `master_auth.client_certificate` - Base64 encoded public certificate +* `master_auth.0.client_certificate` - Base64 encoded public certificate used by clients to authenticate to the cluster endpoint. -* `master_auth.client_key` - Base64 encoded private key used by clients +* `master_auth.0.client_key` - Base64 encoded private key used by clients to authenticate to the cluster endpoint. -* `master_auth.cluster_ca_certificate` - Base64 encoded public certificate +* `master_auth.0.cluster_ca_certificate` - Base64 encoded public certificate that is the root of trust for the cluster. * `master_version` - The current version of the master in the cluster. This may @@ -243,4 +256,4 @@ Container clusters can be imported using the `zone`, and `name`, e.g. ``` $ terraform import google_container_cluster.mycluster us-east1-a/my-cluster -``` \ No newline at end of file +```