Terraform Plugin
Here we'll help you generate an access token for Terraform Cloud and configure the necessary settings to integrate Terraform Cloud with your developer platform.
Generating an Access Token for Terraform Cloud
Terraform supports multiple types of API tokens with varying levels of access:
- User API tokens - Tokens that belong to a specific user that reflect the same permission level as your user account. User tokens are the only token type that can be granted access to multiple organizations.
- Team API tokens - Tokens that belong to a specific team which are used by services, for example a CI/CD pipeline, to perform plans and applies on a workspace.
- Organization API tokens - Tokens that belong to an organization that are used to manage teams, team membership, and workspaces. Organization tokens do not have permission to perform plans and applies in workspaces.
- Audit API tokens - Tokens that provide read-only access for the audit trails API.
You can configure the Terraform plugin in Venue.sh using any token type.
Configuring the Terraform Plugin in Venue.sh
- In the Venue.sh app, click Plugins in the left-side navigation.
- Find Terraform, then click Enable Plugin.
- Paste the Terraform token you created in the previous section into the Terraform Token field.
- Click Enable.
Component Setup Terraform
Within your component catalog-info.yaml file, add the following annotations to connect your Terraform Cloud:
metadata:
annotations:
terraform/organization: YOUR_ORGANIZATION
terraform/workspaces: YOUR_WORKSPACEYou can add multiple workspaces via the terraform/workspaces annotation:
metadata:
annotations:
terraform/organization: YOUR_ORGANIZATION
terraform/workspaces: YOUR_WORKSPACE,YOUR_WORKSPACE_2,YOUR_WORKSPACE_3