Skip to content

Stack Dependency Management

Robert Jack Will edited this page Apr 7, 2016 · 5 revisions

General

One major goal of Cfn-Sphere is to offer a grouping layer for stacks. Basically this is what the StackConfiguration file does. Users can define multiple stacks with bound context in a single configuration file. Cfn-Sphere supports this by handling actions on these stacks in one sync transaction and allowing users to define cross-references between stacks.

Advantages

  • Users can cut their applications infrastructure into manageable pieces (no 4kB json!).
  • Stateless resources like EC2 Instances can cause trouble for CloudFormation causing stacks to be in a "ROLLBACK_FAILED" state where the only solution is to delete them. This is what nobody wants for a stack containing a production database. Cross-referencing allows you to create separate stacks for persistent resources and thus mitigate this risk.
  • It is much easier to share templates and create some kind of appliance model. Teams can share templates in S3 buckets which can be referenced in a stack-configuration file and auto wired into the account by referencing other stacks.

Stack Dependency Model