The effort question is usually what stalls a migration that has already been decided. The fear is a months-long re-platforming project. The reality, for a move to a remote-backend replacement, is a data-moving exercise measured in days — because your engineers keep running terraform plan and terraform apply exactly as they do now. This guide covers what the work actually is: the phases, the tooling each platform provides, the steps that stay manual, and what real migrations took. If you are still deciding whether to go, start with should you migrate off Terraform Cloud.
Days, not months — and the size of your estate matters less than you would expect, because the work parallelizes and automates.
Two real datapoints from teams that migrated to Scalr:
- Ably ran a phased migration — recreating workspaces through the Terraform provider, then moving state across all workspaces with an API script — and cut over with approximately 20 minutes of downtime.
- TV4 migrated 1,000 workspaces and 50,000 resources using a fully automated script. After a one-week pilot in which they migrated their platform team's workspaces and dogfooded the result, they froze deployments for roughly 2 hours to perform the cutover. They noted it could have been faster with multithreading, but treated it as a one-off.
The pattern: small teams finish in a day or two; even a 1,000-workspace estate is a single-digit-hours cutover after a short pilot. What does not scale linearly with workspace count is the manual work — sensitive variables and policy rewrites — covered below.
Six phases, in order. The sequence is what keeps the risk low.
- Export your state files first. Before anything else, pull state for every workspace via
terraform state pull or the HCP Terraform API. Workspace deletion in HCP Terraform is unrecoverable — lose state and your resources keep running in your cloud account with no way to manage them through Terraform.
- Inventory workspaces, variables, and access. Most teams find stale workspaces here. Migrate what is live; archive the rest. This is also the moment to decide whether to keep your existing structure or redesign it — a single TFC organization can become several environments for cleaner credential scoping and isolation.
- Recreate workspaces, VCS connections, and variables. Automated tooling reads your TFC organization and recreates the equivalents on the target platform. If your TFC workspaces are already defined in Terraform code, recreating them can be as small as swapping the provider and a few variable names.
- Re-enter sensitive variables. HCP Terraform does not export sensitive values. This is the one genuinely manual step — budget time for it, or use the migration as the moment to switch to OIDC dynamic credentials and remove static secrets entirely.
- Rewrite Sentinel policies in Rego. If you used Sentinel, policies translate to OPA. Most teams find their policy set smaller than they remembered, and Rego is portable across platforms.
- Cut over per environment. Point one environment's backend configuration at the new platform, run plans side by side until results match, then repeat. There is no big-bang moment — workspaces still on HCP Terraform keep working while migrated ones run elsewhere.
Migration is not a hand-rolled project on the major platforms — each provides an automated path that scans your TFC organization through an API token and recreates it. The tooling differs, but the capability is comparable:
- Scalr ships an open-source migration module,
terraform-scalr-migrate-tfc. It turns a TFC organization into a Scalr environment, workspaces into workspaces, TFC and environment variables into Terraform and shell variables, and moves the current state file — with an option for mass migration or a workspace-by-workspace pace. The Scalr migration walkthrough covers it step by step.
- Spacelift provides a migration kit (
spacemk) that exports TFC workspaces, generates equivalent configuration, builds stacks, and imports state files.
- env0 provides a Migration Wizard that scans your TFC organization via API token, recreates workspaces as environments, and migrates variables and state with staged cutover.
If you are comparing platforms, note that automated TFC migration is table stakes across this category, not a differentiator — weigh the platforms on pricing model and workflow fit instead, which the decision guide covers. HashiCorp's own tooling, by contrast, only automates migration into HCP Terraform, not out of it.
Three things stay hands-on regardless of which tool you use:
- Sensitive variables. Terraform Cloud will not export them. Every sensitive value is re-entered by hand or, better, replaced with OIDC dynamic credentials so there is no static secret to migrate at all.
- Sentinel policies. These need rewriting in Rego. The effort is proportional to policy-set size and complexity, not to workspace count.
- Credentials and integrations. Cloud credentials, VCS connections, and notification integrations are remapped. Using IAM role delegation instead of static keys both reduces this work and improves your security posture — Ably removed a standing AWS IAM user this way during their migration.
The headline: effort scales with sensitive-variable count and policy complexity, not workspace count. A thousand simple workspaces migrate faster than a hundred workspaces wrapped in intricate Sentinel policy.
What can go wrong, and how do you de-risk it?
Real migrations hit small, recoverable snags rather than disasters. TV4, migrating 1,000 workspaces, ran into pagination limits in their script, a few missing IAM roles, and stale TFC lock files — each resolved quickly. The de-risking playbook that keeps those snags from becoming incidents:
- Keep Terraform Cloud live until cutover. Migrated workspaces and not-yet-migrated workspaces coexist, so there is no point where everything is down.
- Validate with side-by-side plans. After moving state, run a plan on the new platform and confirm it shows no diff against TFC before cutting over that workspace.
- Pilot first. Migrate one team's workspaces a week ahead and dogfood them, exactly as TV4 did, so the cutover runs against a proven process.
- Freeze briefly at cutover. Lock workspaces, run the state sync one final time, run the plans once more, then merge the prepared backend-configuration changes. That freeze is the ~20 minutes to ~2 hours in the real examples above.
The cost-benefit framing in our guide to evaluating IaC platform pricing models helps put the effort against the savings — for most teams leaving over RUM pricing, the migration pays for itself well inside a single renewal cycle. When you are ready to run it, the Scalr migration walkthrough is the step-by-step.