The project setting "Discard client IP data" (anonymize_ips on /api/projects/:id) can't be managed by the provider today: posthog_project only covers name/timezone, and posthog_project_settings covers the capture opt-ins but not this field. The REST API reads and PATCHes it fine.
Our use case: we send Conversions API events to Meta from a PostHog destination, and client_ip_address comes from event.properties.$ip. With anonymize_ips enabled the IP is discarded at ingestion, which degrades Meta's event matching (Events Manager flags "user agent sent without IP address"). We'd like the toggle under IaC next to the other project settings instead of a manual UI/API edit.
It should slot into the existing pattern in internal/resource/project_settings.go:
AnonymizeIps types.Bool + schema attribute (optional, computed)
AnonymizeIps *bool `json:"anonymize_ips,omitempty"` on the project structs in internal/httpclient/project.go
- the usual
BoolPtrFromValue / BoolDiverged / PtrToBool wiring in create/read/update
Happy to open a PR if you'd take it.
The project setting "Discard client IP data" (
anonymize_ipson/api/projects/:id) can't be managed by the provider today:posthog_projectonly coversname/timezone, andposthog_project_settingscovers the capture opt-ins but not this field. The REST API reads and PATCHes it fine.Our use case: we send Conversions API events to Meta from a PostHog destination, and
client_ip_addresscomes fromevent.properties.$ip. Withanonymize_ipsenabled the IP is discarded at ingestion, which degrades Meta's event matching (Events Manager flags "user agent sent without IP address"). We'd like the toggle under IaC next to the other project settings instead of a manual UI/API edit.It should slot into the existing pattern in
internal/resource/project_settings.go:AnonymizeIps types.Bool+ schema attribute (optional, computed)AnonymizeIps *bool `json:"anonymize_ips,omitempty"`on the project structs ininternal/httpclient/project.goBoolPtrFromValue/BoolDiverged/PtrToBoolwiring in create/read/updateHappy to open a PR if you'd take it.