> ## Documentation Index
> Fetch the complete documentation index at: https://docs.envzero.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting

> Fix common issues during Terraform Cloud migration, including credential errors, scan failures, state transfer problems, and drift detection.

## Invalid credentials

Verify that:

* The organization name matches exactly (case-sensitive)
* The API token has read access to workspaces, variables, and variable sets
* The token has not expired

## Scan fails or times out

Click **Retry Scan** on the Select Scope step. If the issue persists, check that your TFC organization is accessible and the token permissions are correct.

## Missing secrets not resolving

Sensitive variable values in TFC are write-only and cannot be read by the scanner. You must re-enter these values manually in the Resolve step.

## State migration fails

State migration can fail if:

* The TFC workspace state is locked by an active run
* The state file is too large for a single transfer
* Network connectivity issues between env zero and TFC

Retry the migration for failed workspaces after resolving the underlying issue.

## Drift detected after migration

A non-empty plan after state migration usually means:

* A provider version difference between TFC and env zero
* Environment variables or credentials differ between platforms
* The state was modified in TFC after the migration started

Run the plan in env zero to review the changes and apply if they are expected.

## CLI-driven workspaces

TFC workspaces using CLI-driven runs have no linked repository. The wizard migrates these workspaces, but the resulting env zero environments are not connected to a repository. After migration, connect a repository to the environment in env zero so that deployments can be triggered.

## Token authentication format for Terraform Enterprise

If migrating from Terraform Enterprise (self-hosted), ensure the token variable name matches your hostname format: `TF_TOKEN_<your_tfe_hostname>` (with dots replaced by underscores).

## Related docs

* [State Migration](/guides/admin-guide/remote-backend/state-migration)
* [Environment Locking](/guides/admin-guide/environments/environment-locking)

## Next steps

* [Migrate from Terraform Cloud](/guides/admin-guide/tfc-migration) - Return to the migration overview for the full process.
* [Connect and Scan](/guides/admin-guide/tfc-migration/connect-and-scan) - Restart migration from the first step.
* [Managing Environments](/guides/admin-guide/env-zero-environments) - Learn how migrated environments are structured and managed.
