person1234568475
person1234568475

Reputation: 81

How to run Sceptre hook for ANY stack update (without having to define explicitly for every stack)

I have a hook that I'd like to run every time ANY stack is updated. I know that I can define a hook on a per stack basis, but I'd like to define a hook globally that will run for every stack I have when it gets updated.

Upvotes: 0

Views: 259

Answers (1)

nitishagar
nitishagar

Reputation: 9413

Based on what you mention; the Sceptre folder structure should be defined in a way to have a top-level config.yaml presents all "global" hooks.

config/
  - config.yaml               # This is the top-level Config for your whole project.
  - sceptre-dependencies.yaml # This stack defines your template for buckets, iam role, topics, etc...
  - project/                  # Put all your other project stacks inside
      - config.yaml           # project/
      - vpc.yaml              
      - other-stack.yaml

StackGroup Config might be also something to explore. See: https://docs.sceptre-project.org/latest/docs/stack_group_config.html

Upvotes: 0

Related Questions