How do I automatically confirm runs based on certain conditions?
Last updated: July 14, 2025
Context
When working with Spacelift runs, you may want to automatically confirm and apply changes based on certain conditions, rather than requiring manual confirmation for every change. This is particularly useful for speeding up deployment workflows while maintaining safety controls.
Answer
There are two main approaches to automating run confirmations in Spacelift, each with different use cases:
1. Using Autodeploy
The simplest way to automatically confirm runs is to enable the Autodeploy setting on a stack. When enabled, successful runs will automatically proceed to apply without manual confirmation.
Enable this in stack settings under the Autodeploy option
Best used when you want all successful runs to automatically deploy
Note: With Autodeploy enabled, approval policies are only evaluated during the queued stage, not during the unconfirmed state
2. Using Plan Policies with Approval Policies
For more granular control over automatic confirmations, use a combination of plan and approval policies:
Create a plan policy that issues a "warn" for conditions you want to review
This forces the run into an unconfirmed state
You can use any of the plan policy input data to determine when to warn
Create an approval policy to define your approval rules
The approval policy will be evaluated as a safeguard
Can include conditions like time-based approvals or specific user requirements
Enable Autodeploy on the stack
This combination ensures that:
Runs are automatically deployed when they meet your criteria
You can review the actual plan before approval
Specific conditions can trigger manual review
For examples of policies, check out our example library:
For more information on run states and transitions, refer to our Runs documentation.