Skip to content

Commit

Permalink
PLAT-6938: Run scripts with bash (#112)
Browse files Browse the repository at this point in the history
Execute scripts using bash not as a command to bash.
This avoids issues with file permissions getting lost along the way.

We require the outer bash (interpreter) to split the command into separate arguments
to be passed to our script.
  • Loading branch information
Michael Fraenkel authored Jul 18, 2023
1 parent 5cdc1dd commit ae85969
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions submodules/eks/k8s.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ resource "terraform_data" "run_k8s_pre_setup" {
]

provisioner "local-exec" {
command = "./${module.k8s_setup[0].filename} set_k8s_auth set_eniconfig"
command = "bash ./${module.k8s_setup[0].filename} set_k8s_auth set_eniconfig"
interpreter = ["bash", "-c"]
working_dir = module.k8s_setup[0].resources_directory
}
Expand All @@ -38,7 +38,7 @@ resource "terraform_data" "calico_setup" {
]

provisioner "local-exec" {
command = "./${module.k8s_setup[0].filename} install_calico"
command = "bash ./${module.k8s_setup[0].filename} install_calico"
interpreter = ["bash", "-c"]
working_dir = module.k8s_setup[0].resources_directory
}
Expand Down

0 comments on commit ae85969

Please sign in to comment.