Unmanaged Resources
An unmanaged resource is one that formae identifies but does not manage.
Unmanaged resources are typically discovered via Discovery. formae identifies resources that exist but were not created through formae. It tracks them, but does not modify them until they are transitioned to managed.
Working with unmanaged resources
Important: Unmanaged resources are read-only.
- View: inspect your environment (see inventory)
- Extract: extract configuration into a forma (see extract)
- Manage: apply the extracted forma to transition the resources to managed
Update or delete operations are unavailable until the resources are managed.
Querying unmanaged resources
# View all unmanaged resources
formae inventory resources --query="managed:false"
# Unmanaged resources of a specific type
formae inventory resources --query="managed:false type:AWS::S3::Bucket"
Bringing resources under management
Workflow: discovery → extract → add stack → apply.
1. Discover unmanaged resources: Resources are identified via Discovery and appear as unmanaged until brought under management.
2. Extract unmanaged resources:
# Extract all unmanaged resources
formae extract --query="managed:false" discovered.pkl
# Extract specific types
formae extract --query="managed:false type:AWS::S3::Bucket" buckets.pkl
3. Add a stack label and description:
The extracted forma requires a stack before it can be applied:
amends "@formae/forma.pkl"
import "@formae/formae.pkl"
local myStack = new formae.Stack {
label = "discovered-buckets"
description = "S3 buckets discovered from existing infrastructure"
}
myStack
forma {
// ... extracted resources
}
4. Apply to bring under management:
formae apply --mode reconcile discovered.pkl
Once applied, formae manages these resources as if they were created through formae. They are now managed resources.
Why unmanaged resources exist
This distinction enables formae to coexist with other tools:
- Gradually adopt formae in existing environments
- Operate alongside Terraform, Pulumi, or other IaC tools
- Maintain visibility across your environment, including resources not yet managed
- Selectively transition resources to managed, on your timeline
Discovery identifies resources. You decide which to manage.
Tip: See Discovery for details on how formae identifies unmanaged resources.