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

# HCP Integration

> Integrate Annie with HashiCorp Cloud Platform for Terraform backend and secrets management.

# HCP Integration

HCP integration allows Annie to connect to HashiCorp Cloud Platform (HCP Terraform / Terraform Enterprise) to retrieve state file data when it is not stored on S3.

## Setup Guide

1. Go to the [HCP Cloud integration page](https://app.anyshift.io/integrations/terraform-backend/hcp-cloud)
2. Click **New token**
3. Fill in the HCP Cloud URL, workspace, and API token as described below

### 1. HCP Cloud URL

Usually `https://app.terraform.io`. Use your Terraform Enterprise hostname if you are self-hosting.

### 2. Workspace

The HCP Terraform workspace whose state Annie should ingest. Supported formats:

* Workspace ID: `ws-…`
* Organization and name: `organization/workspace`

Create one Anyshift credential set per workspace you want Annie to read.

### 3. Token

Annie authenticates to HCP Terraform with an API token that can **read the workspace and download its current state**. A **team token** (or group token on HCP Europe) is the recommended choice for shared automation. A **user token** also works if the user can access the workspace.

Organization tokens are not recommended for this integration. Prefer a team or user token scoped to the workspaces Annie needs.

#### Option A: Team API token (recommended)

1. Sign in to [HCP Terraform](https://app.terraform.io) (or your Terraform Enterprise instance)
2. Open **Organization Settings** → **API Tokens** → **Team Tokens**
3. Choose a team that has access to the target workspace
4. Create a new team token and copy it immediately (it is only shown once)
5. Paste the token into Anyshift

For details, see HashiCorp's [Manage API tokens](https://developer.hashicorp.com/terraform/cloud-docs/users-teams-organizations/api-tokens) documentation.

#### Option B: User API token

1. Sign in to [HCP Terraform](https://app.terraform.io) (or your Terraform Enterprise instance)
2. Click your user icon → **Account settings** → **Tokens**
3. Click **Create an API token**, add a description, and set an expiration
4. Copy the token immediately (it is only shown once)
5. Paste the token into Anyshift

For details, see HashiCorp's [Creating a token](https://developer.hashicorp.com/terraform/cloud-docs/users-teams-organizations/users#api-tokens) documentation.

<Note>
  If you have a single token that can access multiple workspaces, you can reuse it in Anyshift, but you still need a separate credential set per workspace. If that is a blocker, tell us and we will prioritize multi-workspace credentials.
</Note>
