A stack cleans up after itself. When its last resource is destroyed, formae
deletes the empty stack for you; you never remove one by hand.
One stack per resource
Each resource belongs to exactly one stack. A single owner is what keeps lifecycle and state tracking unambiguous, and it stops two stacks from fighting over the same resource. Decide which stack a resource lives in when you design your infrastructure.Designing stack boundaries
Because the stack is the unit of lifecycle, its boundaries decide what gets deployed, reconciled, and destroyed together. Common ways to draw them:- By environment:
dev,staging,production - By application or service:
user-service,payments,analytics - By layer:
networking,databases,compute
Version control
formae tracks resources and their lifecycle at the stack level. You can extract any managed stack in your preferred format for version control, backup, or reuse in another environment.See also
- Forma: the declaration that creates and updates stacks.
- Target: where a stack’s resources are applied.
- Apply modes: how reconcile uses stack boundaries to decide what to remove.
- Policy: TTL and auto-reconcile policies, which are scoped to a stack.

