Skip to main content

FeatureFlag

Resource FeatureFlag in pulumi-posthog.
5 min read

Resource FeatureFlag in pulumi-posthog.

Pulumi type: posthog:index/featureFlag:FeatureFlag.

name is the Pulumi resource name. Nested object fields are documented under that object. They are not arguments of this resource.

Example#

Only required arguments are set. A string in angle brackets stands in for that argument. Any other value is an option or example written in the SDK description.

Arguments#

PropertyTypeRequiredDescription
activebooleannoWhether the feature flag is active
createUsageDashboardbooleannoWhether PostHog should auto-create a "Generated Dashboard: <key> Usage" dashboard when the flag is created. Defaults to false: PostHog's API defaults this to true, which silently creates one usage dashboard per flag — for Terraform-managed flag fleets that quickly clutters the dashboard list. Set to true to keep the API's auto-generation. Create-time only; changing it later has no effect and a usage dashboard can always be generated on demand from the flag's Usage tab.
deletedbooleannoWhether the feature flag is soft-deleted. Terraform will restore soft-deleted flags on apply.
ensureExperienceContinuitybooleannoWhether to persist the flag across authentication steps (PostHog's UI labels this as 'Persist flag across authentication steps'). Flags with experience continuity enabled cannot be evaluated by server-side local evaluation; set this to false for flags that must be evaluated locally.
filtersstringnoFeature flag filters as JSON. Compared semantically, so key ordering and whitespace differences from the PostHog API do not produce a diff. Fields present in the API response but absent from this config are kept in state so remote changes surface as drift — except the top-level keys listed in ignoreFilterFields.
ignoreFilterFieldsstring[]noTop-level keys inside filters that Terraform does not track for drift (state mirrors config for them, so changes made outside Terraform don't show as a diff). When unset, defaults to the keys other PostHog products wire into a flag — [, , "holdout"] (Early Access Features and Experiments). Set to [] to track the entire filters blob — including any Early Access Feature or Experiment wiring, which will then show as drift if not declared in filters — or provide your own set to replace the default. A key you also declare inside filters is always tracked (explicit config wins over the ignore list).
keystringyesFeature flag key (unique identifier)
namestringnoFeature flag name/description (PostHog's UI labels this as 'Description'). The API does not expose a separate dedicated description field for feature flags.
projectIdstringnoProject ID (environment) for this resource. Overrides the provider-level project_id.
rolloutPercentagenumbernoRollout percentage (0-100)
tagsstring[]noSet of tags for the feature flag

Outputs#

Computed outputs are produced by the provider. They are not constructor arguments.

PropertyTypeComputedDescription
activebooleannoWhether the feature flag is active
createUsageDashboardbooleannoWhether PostHog should auto-create a "Generated Dashboard: <key> Usage" dashboard when the flag is created. Defaults to false: PostHog's API defaults this to true, which silently creates one usage dashboard per flag — for Terraform-managed flag fleets that quickly clutters the dashboard list. Set to true to keep the API's auto-generation. Create-time only; changing it later has no effect and a usage dashboard can always be generated on demand from the flag's Usage tab.
deletedbooleannoWhether the feature flag is soft-deleted. Terraform will restore soft-deleted flags on apply.
ensureExperienceContinuitybooleannoWhether to persist the flag across authentication steps (PostHog's UI labels this as 'Persist flag across authentication steps'). Flags with experience continuity enabled cannot be evaluated by server-side local evaluation; set this to false for flags that must be evaluated locally.
featureFlagIdnumberyesFeature Flag ID
filtersstringnoFeature flag filters as JSON. Compared semantically, so key ordering and whitespace differences from the PostHog API do not produce a diff. Fields present in the API response but absent from this config are kept in state so remote changes surface as drift — except the top-level keys listed in ignoreFilterFields.
ignoreFilterFieldsstring[]noTop-level keys inside filters that Terraform does not track for drift (state mirrors config for them, so changes made outside Terraform don't show as a diff). When unset, defaults to the keys other PostHog products wire into a flag — [, , "holdout"] (Early Access Features and Experiments). Set to [] to track the entire filters blob — including any Early Access Feature or Experiment wiring, which will then show as drift if not declared in filters — or provide your own set to replace the default. A key you also declare inside filters is always tracked (explicit config wins over the ignore list).
keystringnoFeature flag key (unique identifier)
namestringnoFeature flag name/description (PostHog's UI labels this as 'Description'). The API does not expose a separate dedicated description field for feature flags.
projectIdstringnoProject ID (environment) for this resource. Overrides the provider-level project_id.
rolloutPercentagenumbernoRollout percentage (0-100)
tagsstring[]noSet of tags for the feature flag