sceptre: Defining an explicit dependency

sceptre explicit dependencies

1 min read | by Jordi Prats

When we are using the output of one stack as a parameter for another one we are defining an implicit dependency: sceptre is going to create one first, get it's output and then create the other one. If we still need to create some stack after another but we are not using any output as parameter, we can still define an explicit dependency.

The explicit dependency can be defined using the dependencies field, that will contain a list of objects that will be created before creating this one:

template_path: "template.yaml"
  SomeParameter: its-value
- another-object.yaml

By setting dependencies explicitly, you can ensure that your CloudFormation stacks are created in the correct order, reducing the likelihood of errors and failed deployments. This can be especially important in complex environments with multiple resources.

Posted on 01/03/2023