Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
platforms: add kubeconfig as Terraform output
Browse files Browse the repository at this point in the history
As part of #623, which is about using kubeconfig file content rather
than kubeconfig path around, this commits adds Terraform output with
content of kubeconfig file, which can be then pulled during execution
using 'terraform output' command.

Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
  • Loading branch information
invidian committed Aug 4, 2020
1 parent 863a7a9 commit f4db245
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/platform/aks/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,4 +223,9 @@ output "initialized" {
value = true
sensitive = true
}
output "kubeconfig" {
value = azurerm_kubernetes_cluster.aks.kube_config_raw
sensitive = true
}
`
5 changes: 5 additions & 0 deletions pkg/platform/aws/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,4 +231,9 @@ output "calico_values" {
value = module.aws-{{.Config.ClusterName}}.calico_values
sensitive = true
}
output "kubeconfig" {
value = module.aws-{{.Config.ClusterName}}.kubeconfig-admin
sensitive = true
}
`
5 changes: 5 additions & 0 deletions pkg/platform/baremetal/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,9 @@ output "calico_values" {
value = module.bare-metal-{{.ClusterName}}.calico_values
sensitive = true
}
output "kubeconfig" {
value = module.bare-metal-{{.ClusterName}}.kubeconfig-admin
sensitive = true
}
`
5 changes: 5 additions & 0 deletions pkg/platform/packet/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,4 +305,9 @@ output "calico_values" {
value = module.packet-{{.Config.ClusterName}}.calico_values
sensitive = true
}
output "kubeconfig" {
value = module.packet-{{.Config.ClusterName}}.kubeconfig-admin
sensitive = true
}
`

0 comments on commit f4db245

Please sign in to comment.