From bcb200186d582e51a27181848a08587657c50985 Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Sat, 15 Dec 2018 21:48:08 -0800 Subject: [PATCH] Add admin kubeconfig as a Terraform output * May be used to write a local file --- aws/container-linux/kubernetes/outputs.tf | 4 ++++ aws/fedora-atomic/kubernetes/outputs.tf | 4 ++++ azure/container-linux/kubernetes/outputs.tf | 4 ++++ bare-metal/container-linux/kubernetes/outputs.tf | 4 ++++ bare-metal/fedora-atomic/kubernetes/outputs.tf | 5 +++++ digital-ocean/container-linux/kubernetes/outputs.tf | 4 ++++ digital-ocean/fedora-atomic/kubernetes/outputs.tf | 4 ++++ google-cloud/container-linux/kubernetes/outputs.tf | 4 ++++ google-cloud/fedora-atomic/kubernetes/outputs.tf | 4 ++++ 9 files changed, 37 insertions(+) diff --git a/aws/container-linux/kubernetes/outputs.tf b/aws/container-linux/kubernetes/outputs.tf index 19f79375..21154957 100644 --- a/aws/container-linux/kubernetes/outputs.tf +++ b/aws/container-linux/kubernetes/outputs.tf @@ -1,3 +1,7 @@ +output "kubeconfig-admin" { + value = "${module.bootkube.user-kubeconfig}" +} + # Outputs for Kubernetes Ingress output "ingress_dns_name" { diff --git a/aws/fedora-atomic/kubernetes/outputs.tf b/aws/fedora-atomic/kubernetes/outputs.tf index 19f79375..21154957 100644 --- a/aws/fedora-atomic/kubernetes/outputs.tf +++ b/aws/fedora-atomic/kubernetes/outputs.tf @@ -1,3 +1,7 @@ +output "kubeconfig-admin" { + value = "${module.bootkube.user-kubeconfig}" +} + # Outputs for Kubernetes Ingress output "ingress_dns_name" { diff --git a/azure/container-linux/kubernetes/outputs.tf b/azure/container-linux/kubernetes/outputs.tf index 2f58898e..e85e4f93 100644 --- a/azure/container-linux/kubernetes/outputs.tf +++ b/azure/container-linux/kubernetes/outputs.tf @@ -1,3 +1,7 @@ +output "kubeconfig-admin" { + value = "${module.bootkube.user-kubeconfig}" +} + # Outputs for Kubernetes Ingress output "ingress_static_ipv4" { diff --git a/bare-metal/container-linux/kubernetes/outputs.tf b/bare-metal/container-linux/kubernetes/outputs.tf index 41bd79f2..727feb6b 100644 --- a/bare-metal/container-linux/kubernetes/outputs.tf +++ b/bare-metal/container-linux/kubernetes/outputs.tf @@ -1,3 +1,7 @@ output "kubeconfig" { value = "${module.bootkube.kubeconfig}" } + +output "kubeconfig-admin" { + value = "${module.bootkube.user-kubeconfig}" +} diff --git a/bare-metal/fedora-atomic/kubernetes/outputs.tf b/bare-metal/fedora-atomic/kubernetes/outputs.tf index 41bd79f2..7af5cbfa 100644 --- a/bare-metal/fedora-atomic/kubernetes/outputs.tf +++ b/bare-metal/fedora-atomic/kubernetes/outputs.tf @@ -1,3 +1,8 @@ output "kubeconfig" { value = "${module.bootkube.kubeconfig}" } + +output "kubeconfig-admin" { + value = "${module.bootkube.user-kubeconfig}" +} + diff --git a/digital-ocean/container-linux/kubernetes/outputs.tf b/digital-ocean/container-linux/kubernetes/outputs.tf index eaade704..00ea2694 100644 --- a/digital-ocean/container-linux/kubernetes/outputs.tf +++ b/digital-ocean/container-linux/kubernetes/outputs.tf @@ -1,3 +1,7 @@ +output "kubeconfig-admin" { + value = "${module.bootkube.user-kubeconfig}" +} + output "controllers_dns" { value = "${digitalocean_record.controllers.0.fqdn}" } diff --git a/digital-ocean/fedora-atomic/kubernetes/outputs.tf b/digital-ocean/fedora-atomic/kubernetes/outputs.tf index eaade704..00ea2694 100644 --- a/digital-ocean/fedora-atomic/kubernetes/outputs.tf +++ b/digital-ocean/fedora-atomic/kubernetes/outputs.tf @@ -1,3 +1,7 @@ +output "kubeconfig-admin" { + value = "${module.bootkube.user-kubeconfig}" +} + output "controllers_dns" { value = "${digitalocean_record.controllers.0.fqdn}" } diff --git a/google-cloud/container-linux/kubernetes/outputs.tf b/google-cloud/container-linux/kubernetes/outputs.tf index 49d4edbf..de97fad0 100644 --- a/google-cloud/container-linux/kubernetes/outputs.tf +++ b/google-cloud/container-linux/kubernetes/outputs.tf @@ -1,3 +1,7 @@ +output "kubeconfig-admin" { + value = "${module.bootkube.user-kubeconfig}" +} + # Outputs for Kubernetes Ingress output "ingress_static_ipv4" { diff --git a/google-cloud/fedora-atomic/kubernetes/outputs.tf b/google-cloud/fedora-atomic/kubernetes/outputs.tf index 49d4edbf..de97fad0 100644 --- a/google-cloud/fedora-atomic/kubernetes/outputs.tf +++ b/google-cloud/fedora-atomic/kubernetes/outputs.tf @@ -1,3 +1,7 @@ +output "kubeconfig-admin" { + value = "${module.bootkube.user-kubeconfig}" +} + # Outputs for Kubernetes Ingress output "ingress_static_ipv4" {