Terraform (Server and Cloud)

Supported version: Cloud and Enterprise(Enterprise version till v202206-1)

API Rate Limit: 30 requests per second

Supported Authentication: Token based authentication

IMPORTANT: Please make sure your Terraform Connector(Server and Cloud) instance must be accessible from the Gathr Analytics Machine.

To configure Terraform Connector to use token-based authentication, follow the steps below:

How to acquire User Token:

  1. Sign in to your Terraform Account Refer
  2. From home page Select User.
  3. Under drop down select User Settings.

  1. In User Settings from left side Select Tokens.

  1. Under Tokens, select Create an API token.

  1. Add Description and Create API token.

  2. When you’re done, make sure to copy the token. You’ll use this token in configuring your Connector.

How to acquire Organization Token, follow the below steps: -

  1. Login to your Terraform Account.
  2. Select your organization.

  1. Within Organization page select Settings.

  1. On Settings page select API Tokens from the left side.

  1. From API Tokens select Organization Token.

  2. Click on Create an Organization Token form Organization Token section and save the token as it is displayed only once.

How to acquire Agent Token, follow the below steps:

  1. Navigate to Organization Settings > Agents and click “New agent pool”.

  1. Give your pool a name, then click “Continue”. This name will be used to distinguish your pools when changing the settings of a workspace.

  1. Give your token a description and click “Create Token”.

  1. Click “Finish”.

To configure Terraform connector using Token based authentication, follow the steps below: -

To configure Terraform Datasource:

  1. Enter instance URL for Terraform Cloud i.e. https://app.terraform.io/api/v2
  2. Select “Create New Account” and add user friendly name for account “Terraform Account”
  3. Check “Pass Parameter(s) in Header” and enter followings (Enter User/Organization Token):
    • Token Parameter Key: “Authorization”
    • Value: Bearer
  4. Click on “Save”

To configure Terraform Agent Datasource:

Agent pools have their own set of API tokens which allow agents to communicate with Terraform Cloud, scoped to an organization. These tokens are used only by agents to access following operations:

  1. Show Agent Pools
  2. Show Agents
  3. Show an Agent
  4. Show an Agent Pool
  5. List Agent Tokens

To Configure Terraform Agent Datasource acquire token using the steps given above from How to acquire Agent Token

To configure Terraform Agent Datasource follow the steps given below:

  1. Enter instance URL for Terraform Cloud i.e. https://app.terraform.io/api/v2
  2. Select “Create New Account” and add user friendly name for account “Terraform Agent Datasource”
  3. Check “Pass Parameter(s) in Header” and enter followings (Enter Agent Token):
    • Token Parameter Key: “Authorization”
    • Value: Bearer
  4. Click on “Save”.
Top