Skip to main content
In this tutorial you migrate one non-production Terraform Cloud (TFC) or Terraform Enterprise (TFE) workspace into env zero and check the result. You stop before go live, so the TFC workspace is unlocked again as soon as the state copy finishes and stays usable. The tutorial follows one workspace through the whole wizard. For the options and edge cases at each step, use the migration guide.

Prerequisites

  • Admin role or Edit Organization Settings permission in env zero.
  • A TFC or TFE API token that can read workspaces, variables, variable sets, and state, and can lock and unlock workspaces. Create a user token under User Settings > Tokens in TFC.
  • A TFC workspace that is safe to migrate, such as a development workspace. It must use a GitHub, GitLab, Bitbucket, or Azure DevOps repository. Pick one with no run in progress.
  • The exact name of your TFC organization, for example acme-corp.
If the workspace uses a self-hosted VCS, private git modules, or a .tfvars file, read Before you start first. Pick a workspace that uses none of them for this tutorial.

Connect and scan

1

Start the wizard

Go to Organization Settings > Migration and click Start Migration.
2

Enter your TFC details

Enter your TFC organization name in Terraform Cloud Organization Name and your token in Terraform Cloud API Token. Click Connect & Scan.
3

Wait for the scan

The wizard scans in three phases: Workspaces, Variable Sets, and Projects. A progress count shows how many workspaces and variable sets it has scanned. The scan is read-only.
If the credentials are wrong, the wizard shows Invalid organization name or API token. Please verify your credentials and try again.

Select the workspace

1

Find your workspace

The wizard lists your TFC projects and their workspaces. Use Search workspaces… to find yours.
2

Select only that workspace

Check your workspace and no others. Each TFC project becomes an env zero project, and each workspace becomes an environment.
3

Continue

Click Continue to Review.
A workspace that shows Unsupported VCS provider cannot be selected. Choose another workspace.

Resolve issues

The wizard checks your selection for two kinds of issues: sensitive variables with no value, and VCS providers that are not connected to env zero. If it finds none, it shows No issues found for the selected workspaces. You can proceed to the next step. and you can continue.
1

Enter missing secrets

TFC never shares sensitive values, so migrated sensitive variables arrive empty. Expand the workspace card, enter a value for each variable, and click Save Secrets.
2

Connect the VCS provider

If the wizard lists VCS connection required, click the Connect button for the provider, for example Connect GitHub, and complete the OAuth flow.
Skip for now removes a variable’s value from the migrated environment. Use it only for a variable you no longer need.

Create the environment

1

Review the summary

The summary lists your workspace with its Terraform version, repository branch, and variable count.
2

Create it

Click Create in env zero. The workspace status changes from Migrating… to Migrated.
During this step env zero:
  1. Creates the project and the environment. The environment starts locked.
  2. Copies the variables and configuration sets.
  3. Locks the TFC workspace, copies its state to the env zero remote backend, and unlocks it.
  4. Starts a drift detection plan to check the imported state.
The wizard shows 1 of 1 migrated when it finishes. If the workspace runs Terraform 1.6 or later, the summary shows Converted to: OpenTofu, and the environment runs on OpenTofu. See Review and migrate.

Check the result

1

Open the environment

Open the new project in env zero and click the environment that has your workspace’s name.
2

Check the drift detection plan

Open the deployment history and find the drift detection plan. A plan that reports no changes means the imported state matches your infrastructure. If it reports changes, see Drift detected after migration.
3

Check the variables

Open the environment’s variables and compare them with the TFC workspace. Sensitive variables have values only if you entered them in the Resolve step.
The environment stays locked, so nothing deploys from env zero yet. The TFC workspace is still unlocked and still runs.

Go live when you are ready

Click Continue to Go Live to open the cutover step, or leave the wizard now. Your session is saved, and the TFC Migration widget on your homepage has a Resume Migration button. Go live locks the TFC workspace permanently and unlocks the env zero environment. The wizard has no undo.
Do not go live with a workspace until your team has agreed that env zero takes over from TFC for it.
When you go live, the wizard first checks whether TFC state changed after the copy. If it did, the results show State refreshed from TFC and env zero runs a new drift check. See Go live.

Next steps