Skip to content
Latchkey

Terraform Cloud "Organization ... not found" in CI

HCP Terraform could not resolve the organization named in the cloud block. The name is wrong, or the token authenticates to a different account that has no membership in that org.

What this error means

terraform init fails with "Error: Failed to read organization" and text that the organization was not found or the user is unauthorized.

terraform
Error: Failed to read organization "acme-crop"

Organization "acme-crop" not found or user unauthorized.

Common causes

The organization name is misspelled

Org names are exact slugs. A typo like "acme-crop" instead of "acme-corp" resolves to nothing.

The token belongs to a different account

A personal token for an account with no membership in the org cannot read it, so HCP Terraform reports it as not found.

How to fix it

Correct the organization slug

  1. Copy the exact organization name from the HCP Terraform URL or settings.
  2. Fix organization = ... in the cloud block.
  3. Re-run init to confirm the org resolves.
terraform
cloud {
  organization = "acme-corp"
  workspaces { name = "prod-network" }
}

Use a token with org membership

Switch to a team or org token that belongs to the target organization rather than a personal token from another account.

How to prevent it

  • Keep the organization slug as a single source of truth in the cloud block.
  • Use org-scoped tokens so membership is never in question.
  • Fail fast in review if the org name changes.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →