Linking Pulumi as a source

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.

Learn more
PostHog Wizard hedgehog

Contents

Pulumi Cloud is the managed control plane for Pulumi infrastructure as code. This connector pulls your stacks and their tags, their full update history, Pulumi Deployments runs, the Insights resource index, policy issues, organization members, daily resources under management, and organization audit logs into the PostHog data warehouse, so you can measure deployment frequency, change-failure rate, and lead time for infrastructure changes alongside your product data.

Prerequisites

You need a Pulumi Cloud account and an access token for a member of the organization you want to sync. The Audit logs table additionally requires a Pulumi Cloud plan with audit logs enabled (Enterprise or Business Critical), and the Deployments table only has data if your organization uses Pulumi Deployments.

Adding a data source

  1. In PostHog, go to the Sources tab of the data pipeline section.
  2. Click + New source and click Link next to this source.
  3. Enter your credentials (see Configuration below) and click Next.
  4. Select the tables you want to sync, choose a sync method and frequency, then click Import.

Once the syncs are complete, you can start querying this data in PostHog.

Pulumi authenticates with an access token (it starts with pul-). Create a personal access token on your access tokens page, or an organization access token from your organization's settings, and paste it into the Access token field. The token inherits its owner's access, so no extra scopes are required.

The Organization field takes your organization name as it appears in your Pulumi Cloud console URL (app.pulumi.com/<organization>).

Sync modes

Each table can be synced in one of several modes, depending on what the source supports:

  • Webhook (when available) – the source pushes changes to PostHog in real time. Fastest freshness, lowest ongoing cost, and the only mode that reliably captures updates and deletes.
  • Incremental – only new or updated rows are synced on each run, using a cursor field (such as an updated_at timestamp). Cheaper than a full refresh, but deletes aren't captured.
  • Append only – new rows are appended using a cursor field; existing rows are never updated. Ideal for immutable, append-only tables like event logs.
  • Full refresh – the whole table is reloaded on every sync. Use it when a table has no reliable cursor or when you need deletions reflected.

See sync methods for a full explanation of how each mode works and how to choose between them.

Audit logs syncs incrementally using the API's server-side time filter, and Stack updates syncs incrementally by reading each stack's history newest-first and stopping at the last synced update. Both re-read a short trailing window each run so late-completing updates and boundary events are picked up. The other tables are current-state snapshots, so they sync as full refresh.

Configuration

OptionTypeRequired
Access tokenpasswordYes
OrganizationtextYes

Supported tables

TableDescriptionSync methodIncremental fieldPrimary key
stacks

One row per stack the token can access in the organization, with its last update time and resource count

Full refresh——
stack_updates

The full update/preview/refresh/destroy history of every stack, with outcomes, timings, and resource change counts

Incremental, Full refreshstartTime—
deployments

Pulumi Deployments runs across the organization, with status, operation, and job details. Empty unless the organization uses Pulumi Deployments

Full refresh——
audit_logs

Organization audit log events (who did what, when, from where). Requires a Pulumi Cloud plan with audit logs enabled

Incremental, Full refreshtimestamp—
resources

Every resource in the organization's Pulumi Insights resource index, one row per resource

Full refresh——
policy_issues

Policy issues (open and closed) that Policy Packs detected on stacks and Insights resources, with severity, enforcement level, and triage status

Full refresh——
resource_summary

Daily resources under management (RUM) and resource hours under management (RHUM) for the organization over the last year

Full refresh——
members

Members of the organization, with their login, role, and join date

Full refresh——
stack_tags

One row per tag on every stack (for example environment, owner, or cost center), for grouping stack and update data

Full refresh——

Troubleshooting

  • 401 Unauthorized — the access token is invalid or has been revoked. Create a new access token in Pulumi Cloud and reconnect.
  • 403 Forbidden — the token is valid but does not have access to the requested data. Check that the token's owner is a member of the organization, and for audit logs, that your plan has audit logs enabled.
  • Audit logs table is empty or fails — audit logs are only available on Pulumi Cloud plans with audit logs enabled. Deselect the table if your plan does not include them.

If your sync is failing or data looks wrong, see the Data warehouse troubleshooting guide. If that doesn't help, contact support – we're happy to help.

Still have questions?

Was this page useful?