Skip to content


Spacelift has many features and hidden nuggets so it is easy to overlook some of them but we have you covered with this list of frequently asked questions.

If you still cannot find the answer to your question below, please reach out to our support team.



How do I import the Terraform state for my stack?»

The Terraform state file can be imported during the creation of a stack.

How do I export the Terraform state for my stack?»

The Terraform state file can be pulled and then exported using a Task.

For example, to export the state to an Amazon S3 bucket, you would run the following command as a Task:

terraform state pull > state.json && aws s3 cp state.json s3://<PATH>


For that example to work, the stack needs to have write access to the AWS S3 bucket, possibly via an AWS Integration.

How do I switch from Spacelift managing the Terraform state to me managing it?»

You would first need to export the state file to a suitable location.

The state management setting can not be changed once a stack has been created so you will need to recreate the stack and make sure that the "Manage state" setting is disabled.

How do I manipulate the Terraform state file?»

You can manipulate the Terraform state by running terraform state <SUBCOMMAND> commands in a Task.

This applies whether you or Spacelift manages the Terraform state file.

How do I import existing resources into a Terraform stack?»

Just run the terraform import … in a Task.

This applies whether you or Spacelift manages the Terraform state file.


My policy works fine in the workbench but not on my stack/module»

Except for the Login policies, all policies must be attached to stacks or modules to be evaluated so let's first confirm this by verifying that the stack or module is listed in the "Used by" section on the policy page. If it does not show up there, you will need to attach the policy.

If your policy is attached to your stack/module and you still do not see the expected behavior from that policy, you should make sure that sampling is enabled for that policy, and then review the recorded samples in the Policy Workbench. That should give you valuable insight.

If you do not see any sampled events despite sampling being enabled and having performed events that should have triggered events, make sure that the appropriate type was selected when the policy was created.

I do not see some samples for my Login policy»

Login policies are not evaluated for account creators and SSO admins who always get admin access to their respective Spacelift accounts. This is to avoid a situation where a bad Login policy locks out everyone from the account.

The side-effect is that you will not see samples for these users.

Are Approval policies and run confirmation the same thing?»

Approval policies and run confirmation are related but different concepts.

Just think about how GitHub's Pull Requests work - you can approve a PR before merging it in a separate step. Just like a PR approval means "I'm OK with this being merged", a run approval means "I'm OK with that action being executed" but nothing will happen until someone clicks on the "Merge" or "Confirm" button, respectively.