Merge pull request #52 from max-rocket-internet/kubeconfig-fixes

Making kubeconfig file path and generated config unique
This commit is contained in:
Brandon J. O'Connor
2018-07-09 02:46:10 -07:00
committed by GitHub
6 changed files with 20 additions and 24 deletions

View File

@@ -49,11 +49,10 @@ data "template_file" "kubeconfig" {
vars {
cluster_name = "${var.cluster_name}"
kubeconfig_name = "${local.kubeconfig_name}"
endpoint = "${aws_eks_cluster.this.endpoint}"
region = "${data.aws_region.current.name}"
cluster_auth_base64 = "${aws_eks_cluster.this.certificate_authority.0.data}"
context_name = "${var.kubeconfig_context_name}"
user_name = "${var.kubeconfig_user_name}"
aws_authenticator_command = "${var.kubeconfig_aws_authenticator_command}"
aws_authenticator_additional_args = "${length(var.kubeconfig_aws_authenticator_additional_args) > 0 ? " - ${join("\n - ", var.kubeconfig_aws_authenticator_additional_args)}" : "" }"
aws_authenticator_env_variables = "${length(var.kubeconfig_aws_authenticator_env_variables) > 0 ? " env:\n${join("\n", data.template_file.aws_authenticator_env_variables.*.rendered)}" : ""}"