Skip to content

Commit

Permalink
[Resolves Sceptre#874] Allow generate command to run hooks
Browse files Browse the repository at this point in the history
This enables `before_generate` and `after_generate` hook actions to
allow users to execute hooks when running the `generate` command.
  • Loading branch information
zaro0508 authored and thawkson committed Feb 6, 2021
1 parent 0954634 commit 8591819
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/_source/docs/hooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ If required, users can create their own ``hooks``, as described in the section
Hook points
-----------

``before_generate`` or ``after_generate`` - run hook before or after generating stack template.

``before_create`` or ``after_create`` - run hook before or after Stack creation.

``before_update`` or ``after_update`` - run hook before or after Stack update.
Expand Down
1 change: 1 addition & 0 deletions sceptre/plan/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@ def list_change_sets(self):
except botocore.exceptions.ClientError:
return []

@add_stack_hooks
def generate(self):
"""
Returns the Template for the Stack
Expand Down

0 comments on commit 8591819

Please sign in to comment.