test fixture produced an error for the path of kubectl being .// removed the extra slash to fix

This commit is contained in:
Brandon O'Connor
2018-07-11 23:32:48 -07:00
parent 12b67f3e1f
commit 66e3403387
4 changed files with 6 additions and 6 deletions

4
.gitignore vendored
View File

@@ -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_*

View File

@@ -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 {

View File

@@ -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}"
}

View File

@@ -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 = "./"
}