diff --git a/.gitignore b/.gitignore index 8382e2a..9c5b19c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,8 +7,8 @@ .kitchen.local.yml Gemfile.lock terraform.tfstate.d/ -kubeconfig -config-map-aws-auth.yaml eks-admin-cluster-role-binding.yaml eks-admin-service-account.yaml .idea/ +config-map-aws-auth*.yaml +kubeconfig_* diff --git a/aws_auth.tf b/aws_auth.tf index 6b19dbc..b0bbb32 100644 --- a/aws_auth.tf +++ b/aws_auth.tf @@ -1,12 +1,12 @@ resource "local_file" "config_map_aws_auth" { content = "${data.template_file.config_map_aws_auth.rendered}" - filename = "${var.config_output_path}/config-map-aws-auth_${var.cluster_name}.yaml" + filename = "${var.config_output_path}config-map-aws-auth_${var.cluster_name}.yaml" count = "${var.manage_aws_auth ? 1 : 0}" } resource "null_resource" "update_config_map_aws_auth" { provisioner "local-exec" { - command = "kubectl apply -f ${var.config_output_path}/config-map-aws-auth_${var.cluster_name}.yaml --kubeconfig ${var.config_output_path}/kubeconfig_${var.cluster_name}" + command = "kubectl apply -f ${var.config_output_path}config-map-aws-auth_${var.cluster_name}.yaml --kubeconfig ${var.config_output_path}kubeconfig_${var.cluster_name}" } triggers { diff --git a/kubectl.tf b/kubectl.tf index ec39963..e39cc8c 100644 --- a/kubectl.tf +++ b/kubectl.tf @@ -1,5 +1,5 @@ resource "local_file" "kubeconfig" { content = "${data.template_file.kubeconfig.rendered}" - filename = "${var.config_output_path}/kubeconfig_${var.cluster_name}" + filename = "${var.config_output_path}kubeconfig_${var.cluster_name}" count = "${var.write_kubeconfig ? 1 : 0}" } diff --git a/variables.tf b/variables.tf index 762a89a..45369c4 100644 --- a/variables.tf +++ b/variables.tf @@ -18,7 +18,7 @@ variable "cluster_version" { } variable "config_output_path" { - description = "Determines where config files are placed if using configure_kubectl_session and you want config files to land outside the current working directory." + description = "Determines where config files are placed if using configure_kubectl_session and you want config files to land outside the current working directory. Should end in a forward slash / ." default = "./" }