Add a commands
Property to the Pre/Post Workflow Hooks to Allow Targeted Execution
#3703
Closed
1 task done
Labels
feature
New functionality/enhancement
Community Note
Describe the user story
As an Atlantis user, I would like to be able to run different pre/post workflow hooks for certain Atlantis commands, without needing to add logic to the script to check environment variables.
Describe the solution you'd like
Add an additional property
commands
to the workflow hook definition that would allow the specification of a list of Atlantis commands that the particular hook would run for.Example
This config would run the
plan-hook.sh
script only on execution of plan commands, and theplan-apply-hook.sh
script on the execution of plan and apply commands.If the
commands
property is not present, the script would continue to be run on the execution of any command.Describe the drawbacks of your solution
None
Describe alternatives you've considered
Continue using script logic to check the
COMMAND_NAME
environment variable.The text was updated successfully, but these errors were encountered: