Conditional enablement of stacks within templates

We would like the ability to conditionally enable or disable stacks defined in a template based on input values.

A common use case is selectively deploying optional components, for example via a boolean input such as enable_service_x. When set to false, the corresponding stack should not be created or executed.

This becomes particularly important in templates that define multiple related stacks, where some components are optional depending on environment, tenant, or feature flags.

Expected behaviour:

  • Stacks can be conditionally included or excluded based on template inputs.

  • Disabled stacks are treated as if they do not exist for that run.

  • Any dependencies referencing a disabled stack are ignored rather than causing errors.

  • The dependency graph is resolved dynamically after conditions are evaluated.

Workaround
None
Problem
Currently, all stacks defined in a template are always instantiated, with no mechanism to conditionally exclude them. This forces teams to: 1) Maintain multiple near-identical templates, or 2) Accept unnecessary stack runs for components that are not needed.

Please authenticate to join the conversation.

Upvoters
Status

πŸ‘€ In Review

Board

πŸ’‘ Feature Requests

Tags

Stacks

Date

About 3 hours ago

Subscribe to post

Get notified by email when there are changes.