
HashiCorp (HCP Terraform / Terraform Cloud)
Let AI connect your sources for you
Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

Connect HashiCorp (HCP Terraform / Terraform Cloud) to PostHog to sync your data into the PostHog data warehouse for analysis and modeling.
Sync organizations, projects, teams, workspaces, runs, and state versions from HCP Terraform (formerly Terraform Cloud) into the PostHog Data warehouse to analyze infrastructure change frequency, plan/apply durations, and failure rates.
Create an API token in your HCP Terraform organization settings under API tokens — an organization token is recommended so every workspace is visible. Team and user tokens also work but only see the workspaces they have access to.
Only the SaaS API at app.terraform.io is supported; self-hosted Terraform Enterprise is not currently supported.
Configuration
| Option | Type | Required |
|---|---|---|
API token | password | Yes |
Organization name | text | Yes |
Linking HashiCorp (HCP Terraform / Terraform Cloud) to PostHog
- Go to the Data pipeline page in PostHog
- Click New source and select HashiCorp (HCP Terraform / Terraform Cloud)
- Fill in the required configuration fields
- Click Next, select the tables you want to sync, and then press Import
Supported tables
| Table | Description | Sync method | Incremental field | Primary key |
|---|---|---|---|---|
organizations | The configured HCP Terraform organization. An organization is a shared space for teams to collaborate on workspaces. | Full refresh | — | — |
projects | Projects in the configured organization. Projects group related workspaces and let teams organize permissions at a higher level. | Full refresh | — | — |
teams | Teams in the configured organization. Teams group users and are granted permissions on workspaces and projects. | Full refresh | — | — |
workspaces | Workspaces in the configured organization. A workspace holds a Terraform configuration, its state, and its run history. | Full refresh | — | — |
runs | Runs across every workspace in the organization. A run is one plan/apply cycle performed against a workspace's configuration. | Incremental, Full refresh | created_at | — |
state_versions | State versions across every workspace in the organization. A state version is one snapshot of a workspace's Terraform state, created by an apply or an upload. | Incremental, Full refresh | created_at | — |