You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Atlantis allows the definition of pre/post workflow hooks that apply to all the commands being executed. Sometimes these hooks are only meant to work with a given command and will fail. This does not break the workflow because workflow hook failures are not fatal, but it'll spam the logs with errors that are not relevant.
If Atlantis allow per-command workflow hooks, we could define some hooks that only execute for, say, apply and not for plan.
Reproduction Steps
The configuration below just illustrated that the workflow hooks are executing commands that only really apply to the plan command in the workflow definition. When the apply command runs, it won't generate the needed file which will cause errors in the post_workflow_hooks commands. This is a simplification of the situation we had in a more complex custom workflow.
I'm currently working on a custom script for the pre/post workflow hooks that only needs to run for the apply step. There is no environment variable context during execution that tells us whether we are in the plan or apply stage.
This requested feature would solve the problem by letting us specify something like pre_apply_workflow_hooks or
Community Note
Overview of the Issue
Atlantis allows the definition of pre/post workflow hooks that apply to all the commands being executed. Sometimes these hooks are only meant to work with a given command and will fail. This does not break the workflow because workflow hook failures are not fatal, but it'll spam the logs with errors that are not relevant.
If Atlantis allow per-command workflow hooks, we could define some hooks that only execute for, say,
apply
and not forplan
.Reproduction Steps
The configuration below just illustrated that the workflow hooks are executing commands that only really apply to the
plan
command in the workflow definition. When theapply
command runs, it won't generate the needed file which will cause errors in thepost_workflow_hooks
commands. This is a simplification of the situation we had in a more complex custom workflow.Logs
Environment details
Atlantis 0.19.2
The text was updated successfully, but these errors were encountered: