Problem
Terraform Enterprise custom build worker variables set in ~/.bashrc
are not used in local-exec commands
Prerequisites (if applicable)
- Running Terraform Enterprise with a custom build worker
- ENV variables are set in
~/.bashrc
Cause
local-exec
for Terraform Enterprise does not run inbash
by default.
Solutions:
-
resource "null_resource" "example1" {
provisioner "local-exec"
{ command = "env"
interpreter = ["/bin/bash", "-c"]
}
}