> ## Documentation Index
> Fetch the complete documentation index at: https://stackone-hub-docs-confluence-api-token-update.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Terraform

> Follow these steps to connect Terraform via the StackOne Hub successfully.

<Warning>
  Ensure you have Admin or Owner privileges within your Terraform account.
</Warning>

If you've been directed to StackOne to integrate with Terraform, the following steps will help you understand the process and any necessary actions to configure successful integration.

## Get Your Terraform Organization Name

<Steps>
  <Step title="Find Organization Name">
    Each connected Account with StackOne will be associated with one Terraform Organization.

    While logged in to your [Terraform](https://app.terraform.io) instance, your Organization Name is visible in the top left corner before the current Workspace.

    Your Organization Name also exists in the URL. Example: `https://app.terraform.io/app/{{Organization Name}}/workspaces`

    <Frame>
      <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Organization Name" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/0zRfAlVllz5bF-yn/images/terraform/image1.png?fit=max&auto=format&n=0zRfAlVllz5bF-yn&q=85&s=ed98d0aa29e8f514ba2e468d232316ba" width="695" height="438" data-path="images/terraform/image1.png" />
    </Frame>
  </Step>
</Steps>

## Get Your Terraform API Token

<Steps>
  <Step title="Open Account Settings">
    Click your profile icon in the top left, then click [Account settings](https://app.terraform.io).

    <Frame>
      <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Account Settings" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/0zRfAlVllz5bF-yn/images/terraform/image2.png?fit=max&auto=format&n=0zRfAlVllz5bF-yn&q=85&s=e048149beb390d86122b9b06bd1c3171" width="644" height="623" data-path="images/terraform/image2.png" />
    </Frame>
  </Step>

  <Step title="Navigate to Tokens">
    Click Account settings > Tokens on the left.

    <Frame>
      <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Tokens" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/0zRfAlVllz5bF-yn/images/terraform/image3.png?fit=max&auto=format&n=0zRfAlVllz5bF-yn&q=85&s=165a372b32fd0e0ad178600e609c820a" width="367" height="394" data-path="images/terraform/image3.png" />
    </Frame>
  </Step>

  <Step title="Create API Token">
    Under Tokens, click the Create an API token button.

    <Frame>
      <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Create API Token" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/0zRfAlVllz5bF-yn/images/terraform/image4.png?fit=max&auto=format&n=0zRfAlVllz5bF-yn&q=85&s=442949dbfae89b8e6e18083d7d9fe8c4" width="878" height="408" data-path="images/terraform/image4.png" />
    </Frame>
  </Step>

  <Step title="Enter Token Details">
    Under Creating a user token, enter a Description and your desired Expiration, then click the Generate token button.

    <Frame>
      <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Token Details" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/0zRfAlVllz5bF-yn/images/terraform/image5.png?fit=max&auto=format&n=0zRfAlVllz5bF-yn&q=85&s=382590de2a75ef6ad7f76916fba034c5" width="642" height="430" data-path="images/terraform/image5.png" />
    </Frame>
  </Step>

  <Step title="Copy API Token">
    Copy your displayed Token and store it safely.

    <Frame>
      <img className="rounded-md" style={{ margin: '0 auto', border: '1px solid #efefef' }} alt="Copy API Token" src="https://mintcdn.com/stackone-hub-docs-confluence-api-token-update/0zRfAlVllz5bF-yn/images/terraform/image6.png?fit=max&auto=format&n=0zRfAlVllz5bF-yn&q=85&s=ea6da741bc9da1c16a36b391b5ad08f5" width="1571" height="662" data-path="images/terraform/image6.png" />
    </Frame>
  </Step>
</Steps>

## Connecting with StackOne

<Steps>
  <Step title="Enter API Token and Organization Name">
    Upon reaching the Link Account page, enter your API Token and Organization Name from the previous steps.
  </Step>

  <Step title="Connect">
    Proceed by clicking the Connect button.
  </Step>
</Steps>

<br />

Congratulations, you're all set! If you face any issues with the steps mentioned above,
please contact us by emailing [integrations@stackone.com](mailto:integrations@stackone.com). We're always here to assist you!

## Available data

This integration has the following [IAM Resources](https://docs.stackone.com/reference/iam_list_users) available from the provider:

<ul>
  <li>Users</li>
  <li>Roles</li>
  <li>Groups</li>
  <li>Policies</li>
</ul>

## Useful Links

<Card title="API Reference" icon="link" href="https://developer.hashicorp.com/terraform/cloud-docs/api-docs">
  [https://developer.hashicorp.com/terraform/cloud-docs/api-docs](https://developer.hashicorp.com/terraform/cloud-docs/api-docs)
</Card>
