Open antonioned opened 1 year ago
I found a workaround for this issue.
Change the shell in the job to something like this:
shell: /bin/sh -leo pipefail
Then add another command previous to the terraform/plan command like this:
- run:
name: Export envvars for terraform commands
command: |
echo "export ENV=${ENV}" >> $BASH_ENV
Orb Version 3.2.0
Describe the bug When using the orb, I can't find a way to use an env variable defined in the CircleCI contexts inside an orb command. In my example I have the terraform modules in different paths based on environment, something like
env/qa
andenv/prod
and I define theqa
andprod
part in an ENV env variable in the contexts, e.g.env/${ENV}
.However I configure this path I get the error
I tried using an absolute path as well, no luck.
To Reproduce
Use an environment variable in the
path
parameter in orb commands.Expected behavior
I expect the orb to see and use the environment variables I set in CircleCI contexts or project settings.