HashiCorp Cloud Platform
Connect Infragraph to Terraform Enterprise
The Terraform Enterprise connection connects your Terraform Enterprise data to the resource graph.
Create a Terraform Enterprise team
We recommend you create a new Terraform Enterprise team to use for your Infragraph connection. To give Infragraph access to all workspaces in your Terraform Enterprise instance, enable the following permissions:
You can use Terraform Enterprise permissions to limit the scope of your API token to specific projects or workspaces. Refer to the Manage teams documentation for more information.
Create an Terraform Enterprise team token
To connect Infragraph to Terraform Enterprise, you must provide an API token. Refer to the Team API Tokens documentation for more information.
Set up the connection
Complete the following steps to establish a new Terraform Enterprise connection:
- From the Resource graph Overview at the top right, click Create Connection.
- Select Terraform Enterprise from the list of data sources.
- Click Authenticate Connection.
- Under TFE Hostname, enter the address of your Terraform Enterprise instance.
- Follow the instructions to paste the team token.
- Click the Review connection details button.
- Review the connection information.
- Click the Create connection button.
The data source connects to your Terraform Enterprise organization.
Sync Terraform Enterprise data
To find the current sync status for your connector, complete the following steps:
- Click Connections in your HCP organization's left navigation panel.
- Check the connection sync status.
Infragraph reports one of the following statuses:
- Awaiting initial sync means that the connection was created but Infragraph has not initiated the first data sync.
- Successful means there were no errors in the latest sync and Infragraph synced the data.
- Partial failure means at least one error occurred in the latest sync.
To manually initiate a new sync, select Sync connection from the … menu in the Actions column.
View Terraform Enterprise data
To find Terraform Enterprise data connected to your resource graph, complete 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 a saved query that includes Terraform Enterprise resources.
- Build a custom query using Terraform Enterprise resources in the query editor. For easy filtering, you can select IaC or Management options.