Auto-deploying scheduled runs while requiring confirmation for manual runs

Last updated: July 14, 2025

If you want scheduled runs to deploy automatically while still requiring manual confirmation for other runs, you can achieve this using a combination of auto-deploy and a plan policy.

Configuration Steps

  1. Enable auto-deploy for the stack where you want to run scheduled deployments

  2. Create a plan policy that checks the trigger source and returns a "warn" result for non-scheduled runs

Creating the Plan Policy

Add a plan policy that checks the "triggered by" field. When the run is triggered by the scheduler, it will proceed with auto-deploy. For all other triggers, the policy will return a warning, causing the run to require manual confirmation.

Example policy code:

package spacelift

warn[msg] {
    not startswith(input.spacelift.run.triggered_by, "spacelift/schedules/run")
    msg := "Manual confirmation required for non-scheduled runs"
}

For more information about plan policies, see our Plan Policy documentation.