-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Atlantis environment variables to be set in extra_args #659
Comments
This is because the built-in Implementation note for whoever implements this: should pass in the env vars from the |
@rhughes1 I was running into the same issue and I wanted to keep the workflow definition clean and simple. You can achieve that by using the TF_CLI_ARGS and TF_CLI_ARGS_name functionality of Terraform. This is how my Workflow definition look:
|
As an alternative to the
|
Atlantis Version: 0.7.2
Description: Trying to use the Atlantis environment variables inside of a custom workflow inside the
extra_arguments
. I realized after testing it's only allowed in therun
portion of a custom workflowFor my example, I'm trying to access the workspace, base repo name inside the extra arguments:
However, it doesn't correctly read the environment variable. Ideally I just want to inject a variable which relies on Atlantis set environment variables without re-defining the Terraform commands
Workaround
Define the custom workflow as run commands, ensuring that you account for selecting the workspace.
However, when I do this, the output of the command in the GitHub pull request isn't exactly the prettiest and I don't know why... Notice the red highlighted lines along with the output of the tfplan. Normally Atlantis hides this output. Any ideas on how to fix this would be greatly appreciated.
The text was updated successfully, but these errors were encountered: