← all branches

fix/ph-insights

safe
ba4f438 · incrementalpre-PRreviewed 2026-08-01 00:54 UTC0H · 0M · 1L · 1I
The branch
Purpose
Fix Terraform apply failures caused by PostHog provider bug when detaching insights from dashboards
Goal
Stabilize posthog IaC so terraform apply succeeds; codify CFE delivery-health analytics insights (BAT-293)
Sub-goals
  • Codify CFE delivery-health insights (warehouse-backed) into IaC
  • Remove broken tiles that referenced never-firing cfe_job.* events
  • Work around provider limitation preventing dashboard_ids=[] on existing insights
The changes (whole branch)
What
infra/posthog/ — added warehouse-backed CFE delivery-health insights + dashboards (BAT-293), then iteratively fixed provider errors: removed non-renderable tiles, re-tiled dead insights with explicit dead labels as provider workaround
Why
PostHog Terraform provider throws 'inconsistent result after apply' when setting dashboard_ids=[] on an insight that already has a dashboard association. Re-tiling with a dead label is the only stable state until BAT-286 removes them properly.
Areas
infra/posthog/dashboards.tf+4714infra/posthog/insights.tf+35520
Blast
2 files, +402/-34 lines, entirely within infra/posthog/. No app code, no migrations, no API surface touched.
terraform-provider-workaround dead-events BAT-286-tracks-cleanup
ci· no runner on pre-PR branchcoderabbit· no .coderabbit.yamltests· Terraform IaC — no unit tests by design

Findings · 2

conventions2

low

Spanish section comment in English-only Terraform file

infra/posthog/dashboards.tf:268

New tile section header is in Spanish ('Tiles muertos…') while all surrounding Terraform comments are in English. Suggest: '# ── Dead tiles (empty by design; superseded by warehouse insights) ──'

info

Redundant depends_on — reference in dashboard_ids already implies it

infra/posthog/insights.tf:657

Both insights reference posthog_dashboard.platform_health.id inside dashboard_ids, creating an implicit Terraform dependency. The explicit depends_on is redundant. Harmless — may have been added defensively given prior provider bugs.

History · 5 commits

  1. ba4f438safeincremental0H · 0M · 1L2026-08-01 00:54current
  2. f9ad657needs attentionincremental0H · 1M · 2L2026-08-01 00:35
  3. 1475bfbsafeincremental0H · 0M · 0L2026-07-31 20:34
  4. 6b58b01needs attentionfull0H · 3M · 5L2026-07-31 18:10
  5. a97e2f0needs attentionfull1H · 2M · 2L2026-07-31 17:23