From 0954634af3340da71eae07628d03a4c232c69371 Mon Sep 17 00:00:00 2001 From: mrowlingfox Date: Fri, 28 Aug 2020 14:36:48 +1000 Subject: [PATCH] [Resolve #929] Add hooks to validate 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. --- docs/_source/docs/hooks.rst | 2 ++ sceptre/plan/actions.py | 1 + 2 files changed, 3 insertions(+) diff --git a/docs/_source/docs/hooks.rst b/docs/_source/docs/hooks.rst index 616d3c392..69ad48f17 100644 --- a/docs/_source/docs/hooks.rst +++ b/docs/_source/docs/hooks.rst @@ -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: diff --git a/sceptre/plan/actions.py b/sceptre/plan/actions.py index 09a22dd29..fcd02cda9 100644 --- a/sceptre/plan/actions.py +++ b/sceptre/plan/actions.py @@ -579,6 +579,7 @@ def generate(self): """ return self.stack.template.body + @add_stack_hooks def validate(self): """ Validates the Stack's CloudFormation Template.