HashiCorp Cloud Platform
HCP Terraform connection
The HCP Terraform connection connects your HCP Terraform data to the resource graph.
Create an HCP Terraform team
We suggest you create a new HCP Terraform team to use for your Infragraph connection. To give Infragraph access to all workspaces in your HCP Terraform organization, give the team the following permissions:
- View all projects
- View all workspaces
You can use HCP Terraform permissions to limit the scope of your API token to specific projects or workspaces. Refer to the Manage teams documentation for more information.
Crate an HCP Terraform team token
To connect Infragraph to HCP Terraform, you must provide an API token. Refer to the Team API Tokens documentation for more information.
Set up the connection
To establish a new HCP Terraform connection:
- From the Resource graph Overview, at the top right, click Create Connection.
- Select HCP Terraform from the list of data sources.
- Click Select Terraform.
- Follow the instructions to paste the team token.
- Click the Create connection.
The data source connects to your HCP Terraform organization.
Sync HCP Terraform data
To find the current sync status for your AWS data:
Click Connections in your HCP organization's left navigation panel.
Check the HCP Terraform connection sync status.
Awaiting initial syncmeans that the connection was created but the first data sync does not initiated.Successfulmeans there were no errors in the latest sync and the data was synced.Partial failuremeans at least one error occurred in the latest sync.
To manually initiate a new sync, next to the Data source, under Actions, click … and then select Sync connection.
View HCP Terraform data
To find HCP Terraform data connected to your resource graph, try any of the following actions:
- Go to the Inventory page. Click an individual resource type to view it in the graph explorer.
- Query resources with any of the existing queries that include HCP Terraform resources.
- Build the query from scratch using HCP Terraform resources in the query editor. For easy filtering, you can select IaC or Management options.