Skip to main content
A forma (plural: formae) is an infrastructure declaration. When you apply a forma, formae processes it to create, update, or delete resources. A forma defines the exact scope of change, whether that’s an entire environment or a single update. You can manage your deployment at any level of granularity, without being forced to touch unrelated resources. Formae support three operations:
  • apply a forma to provision or modify infrastructure
  • extract a forma from existing resources, capturing their current state so you can reuse it elsewhere
  • destroy a forma to decommission the resources it declares
A forma can be temporary (used once) or committed to version control for long-term management.

Example

Every forma includes at least one stack to organize resources and at least one target to specify where they’re applied.
This example uses amends "@formae/forma.pkl". formae project init now generates extends "@formae/forma.pkl" instead, which additionally lets you declare typed CLI properties. Both forms are supported.
A forma might not complete successfully: failures can occur between the agent and the target systems. Incomplete execution leaves infrastructure in a consistent state. If the failure is recoverable or caused by bad input, reapply the forma. The agent retries when it can.

See also

  • Write your first forma: structure, properties, and resource references, hands-on
  • Stack: how resources are grouped for lifecycle management
  • Target: where a forma’s resources are applied