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:
- Sign in to your Terraform Account Refer
- From home page Select User.
- Under drop down select User Settings.
- In User Settings from left side Select Tokens.
- Under Tokens, select Create an API token.
Add Description and Create API token.
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: -
- Login to your Terraform Account.
- Select your organization.
- Within Organization page select Settings.
- On Settings page select API Tokens from the left side.
From API Tokens select Organization Token.
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:
- Navigate to Organization Settings > Agents and click “New agent pool”.
- Give your pool a name, then click “Continue”. This name will be used to distinguish your pools when changing the settings of a workspace.
- Give your token a description and click “Create Token”.
- Click “Finish”.
To configure Terraform connector using Token based authentication, follow the steps below: -
To configure Terraform Datasource:
- Enter instance URL for Terraform Cloud i.e. https://app.terraform.io/api/v2
- Select “Create New Account” and add user friendly name for account “Terraform Account”
- Check “Pass Parameter(s) in Header” and enter followings (Enter User/Organization Token):
- Token Parameter Key: “Authorization”
- Value: Bearer
- 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:
- Show Agent Pools
- Show Agents
- Show an Agent
- Show an Agent Pool
- 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:
- Enter instance URL for Terraform Cloud i.e. https://app.terraform.io/api/v2
- Select “Create New Account” and add user friendly name for account “Terraform Agent Datasource”
- Check “Pass Parameter(s) in Header” and enter followings (Enter Agent Token):
- Token Parameter Key: “Authorization”
- Value: Bearer
- Click on “Save”.
If you have any feedback on Gathr documentation, please email us!