Why do I get "drift detection is enabled, can't switch to default workerpool" when updating a stack?
Last updated: July 9, 2026
Context
When attempting to update a Spacelift stack (for example, switching the IaC tool version), you may encounter the following error:
Error: could not update stack: drift detection is enabled, can't switch to default workerpoolThis error occurs when drift detection is enabled on the stack but no private worker pool is explicitly assigned to it.
Answer
Drift detection requires a private worker pool. If the worker_pool_id is not explicitly set in your spacelift_stack resource, any apply operation will attempt to reset the pool back to the default worker pool — which drift detection blocks.
To resolve this, add the worker_pool_id argument to your spacelift_stack resource definition:
resource "spacelift_stack" "your_stack" {
# existing config
worker_pool_id = "<your-private-pool-id>"
}Follow these steps:
Locate the
spacelift_stackresource in your Terraform/OpenTofu configuration.Add the
worker_pool_idargument, setting it to the ID of your private worker pool.Re-run the apply operation. The error should no longer occur.
By explicitly pinning the worker_pool_id, Spacelift will no longer attempt to reset the pool to the default, allowing the stack update to proceed without conflicting with drift detection.