Skip to content
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

Atlantis does not set Env variables when output: hide in multienv #5318

Open
hkobayash opened this issue Feb 12, 2025 · 1 comment · May be fixed by #5319
Open

Atlantis does not set Env variables when output: hide in multienv #5318

hkobayash opened this issue Feb 12, 2025 · 1 comment · May be fixed by #5319
Labels
bug Something isn't working

Comments

@hkobayash
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Overview of the Issue

When using the multienv command in a custom workflow, if hide is set for multienv.output, the environment variables will not be set.

Reproduction Steps

workflows:
  default:
    plan:
      steps:
      - multienv:
          command: echo TF_VAR_TEST1=test1
          output: show
      - multienv:
          command: echo TF_VAR_TEST2=test2
          output: hide
      - run: echo $TF_VAR_TEST1
      - run: echo $TF_VAR_TEST2

Logs

Ran Plan for project: test dir: test workspace: default

Dynamic environment variables added:
TF_VAR_TEST1

test1
  • 🔁 To plan this project again, comment:
    atlantis plan -p test

Environment details

  • Atlantis version: v0.33.0
  • Deployment method: ecs

Additional Context

https://www.runatlantis.io/docs/custom-workflows#multiple-environment-variables-multienv-command

@hkobayash hkobayash added the bug Something isn't working label Feb 12, 2025
Copy link

dosubot bot commented Feb 12, 2025

Hey @hkobayash! I'm here to help you with any bugs, questions, or contributions you have for Atlantis. Let's tackle this together!

The issue you're encountering seems to be a misunderstanding of how the multienv command with output: hide is supposed to work. According to the documentation, the output option in the multienv command affects only the visibility of the message about added environment variables, not their availability. Even if output is set to "hide", the environment variables should still be available for use in subsequent steps [1].

However, if you're experiencing that the environment variables are not being set when output: hide is used, it might be a bug or an unexpected behavior in the version of Atlantis you are using. The expected behavior is that the environment variables should be set regardless of the output setting. You might want to check if there are any updates or patches available for your Atlantis version that address this issue.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other | Bug Report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant