Skip to content

Commit

Permalink
[Resolve Sceptre#929] Add hooks to validate
Browse files Browse the repository at this point in the history
Adds before_validate and after_validate hooks.
Hooks for validate are necessary for actions that need to
happen before any template validation.
For example, downloading required artifacts.
  • Loading branch information
mrowlingfox authored and thawkson committed Feb 6, 2021
1 parent 50bfff3 commit 0954634
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 @@ -20,6 +20,8 @@ Hook points

``before_launch`` or ``after_launch`` - run hook before or after Stack launch.

``before_validate`` or ``after_validate`` - run hook before or after Stack validation.

``before_create_change_set`` or ``after_create_change_set`` - run hook before or after create change set.

Syntax:
Expand Down
1 change: 1 addition & 0 deletions sceptre/plan/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@ def generate(self):
"""
return self.stack.template.body

@add_stack_hooks
def validate(self):
"""
Validates the Stack's CloudFormation Template.
Expand Down

0 comments on commit 0954634

Please sign in to comment.