Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed dependency to obsolete template_file by upgrading to templatefile #1119

Merged
merged 2 commits into from
Jan 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions modules/auth/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,3 @@ data "google_container_cluster" "gke_cluster" {
}

data "google_client_config" "provider" {}

data "template_file" "kubeconfig" {
template = file("${path.module}/templates/kubeconfig-template.yaml.tpl")

vars = {
context = local.context
cluster_ca_certificate = local.cluster_ca_certificate
endpoint = local.endpoint
token = data.google_client_config.provider.access_token
}
}
7 changes: 6 additions & 1 deletion modules/auth/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
output "kubeconfig_raw" {
sensitive = true
description = "A kubeconfig file configured to access the GKE cluster."
value = data.template_file.kubeconfig.rendered
value = templatefile("${path.module}/templates/kubeconfig-template.yaml.tpl", {
context = local.context
cluster_ca_certificate = local.cluster_ca_certificate
endpoint = local.endpoint
token = data.google_client_config.provider.access_token
})
}

# Terraform providers (kubernetes, helm)
Expand Down