Allow config_output_path to specify the full path (#549)

This commit is contained in:
Joshua Spence
2019-10-21 23:55:29 +11:00
committed by Max Williams
parent c81e1d2fa7
commit 4369f0271b
4 changed files with 6 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
resource "local_file" "kubeconfig" {
count = var.write_kubeconfig ? 1 : 0
content = data.template_file.kubeconfig.rendered
filename = "${var.config_output_path}kubeconfig_${var.cluster_name}"
filename = "${substr(var.config_output_path, -1, 1) == "/" ? "${var.config_output_path}kubeconfig_${var.cluster_name}" : var.config_output_path}"
}