Synchronization
formae continuously synchronizes resource changes into its state. This lets you work with any style or workflow in your team and environment.
Synchronization periodically scans managed resources for changes. When a change is detected, formae automatically updates its internal state without requiring you to explicitly refresh it. This ensures formae is always up to date and remains the source of truth.
How Synchronization Works
When synchronization is enabled, formae regularly checks your resources against their current state in the cloud. This applies to both managed and unmanaged resources. If someone makes a change outside of formae—whether through the AWS console, another IaC tool, or a script—formae detects it and updates its internal state automatically.
When out-of-band changes are synchronized into formae, you have control over what happens next. On your next apply operation, you can choose to: - Keep the changes - Accept the external modifications and update your infrastructure code accordingly - Overwrite them - Revert to your infrastructure code and discard the external changes
This means you can: - Use formae alongside other tools without conflicts - Make emergency changes through the cloud console when needed - Collaborate with team members using different workflows - Always have an accurate view of your infrastructure state - Decide whether to keep or discard external changes
Configuration:
Synchronization must be explicitly configured in your agent configuration:
agent {
synchronization {
enabled = true
interval = 5.min // How often to check for changes
}
}
Use Cases
Emergency fixes: During an incident, you might need to make a quick change through the cloud console. With synchronization enabled, formae will detect this change and update its state, so your infrastructure code stays current.
Multi-tool environments: If your team uses multiple tools to manage infrastructure, synchronization ensures formae maintains an accurate view of all resources, regardless of how they were modified.
Gradual adoption: When migrating to formae, synchronization lets you continue using existing tools while formae tracks all changes, giving you a unified view of your infrastructure.
Tip: Synchronization works hand-in-hand with discovery. Discovery finds new resources, while synchronization keeps track of changes to all resources that formae knows about.