Problem
Terraform Enterprise custom build worker variables set in ~/.bashrc
are not used in local-exec commands
Prerequisites
- Running Terraform Enterprise
v202308-1
or older 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"]
}
}