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 .kitchen.local.yml
Gemfile.lock Gemfile.lock
terraform.tfstate.d/ terraform.tfstate.d/
kubeconfig
config-map-aws-auth.yaml
eks-admin-cluster-role-binding.yaml eks-admin-cluster-role-binding.yaml
eks-admin-service-account.yaml eks-admin-service-account.yaml
.idea/ .idea/
config-map-aws-auth*.yaml
kubeconfig_*

View File

@@ -1,12 +1,12 @@
resource "local_file" "config_map_aws_auth" { resource "local_file" "config_map_aws_auth" {
content = "${data.template_file.config_map_aws_auth.rendered}" 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}" count = "${var.manage_aws_auth ? 1 : 0}"
} }
resource "null_resource" "update_config_map_aws_auth" { resource "null_resource" "update_config_map_aws_auth" {
provisioner "local-exec" { 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 { triggers {

View File

@@ -1,5 +1,5 @@
resource "local_file" "kubeconfig" { resource "local_file" "kubeconfig" {
content = "${data.template_file.kubeconfig.rendered}" 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}" count = "${var.write_kubeconfig ? 1 : 0}"
} }

View File

@@ -18,7 +18,7 @@ variable "cluster_version" {
} }
variable "config_output_path" { 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 = "./" default = "./"
} }