The PostHog provider enables you to manage product analytics, feature flags, and event tracking resources in PostHog using Pulumi. This provider is dynamically bridged from the Terraform PostHog Provider.
Installation#
Install the PostHog provider package using your preferred package manager:
Quick Start#
Key Features#
The PostHog provider supports the following resources for managing your product analytics infrastructure:
Feature Flags#
Create and manage feature flags with advanced targeting and rollout strategies. Perfect for gradual rollouts, A/B testing, and targeted feature releases.
Dashboards#
Build custom dashboards for visualizing your analytics data.
Insights#
Configure analytics insights for tracking events, funnels, retention, and other metrics.
Alerts#
Set up alerts to monitor metrics and get notified when thresholds are exceeded.
Hog Functions#
Create custom Hog functions for data transformation and routing.
Surveys#
Create project-scoped surveys with display conditions, targeting, and iteration scheduling.
External Data Sources#
Sync data from external systems (Postgres, Stripe, etc.) into PostHog as warehouse tables.
Proxy Records#
Provision organization-scoped PostHog reverse-proxy records on custom domains.
Configuration#
See the Configuration guide for detailed setup instructions, including:
- Getting your PostHog API key
- Setting up Pulumi configuration
- Configuring self-hosted PostHog instances
- Multi-environment and multi-project setups
Common Use Cases#
Feature Rollout Strategy#
Analytics Dashboard#
Resource Types#
| Resource | Description |
|---|---|
| FeatureFlag | Feature flag management for gradual rollouts and A/B testing |
| Dashboard | Custom dashboards for data visualization |
| Insight | Analytics queries and insights |
| Alert | Metric alerts and notifications |
| HogFunction | Custom data transformation functions |
| Survey | Project-scoped surveys with targeting and iteration scheduling |
| ExternalDataSource | Sync warehouse data from external systems (Postgres, Stripe, etc.) |
| ProxyRecord | Organization-scoped reverse-proxy records on custom domains |