Skip to content

ADR-0004 — Zero statefile — Snowflake as source of truth

Update date : 2026-05-27 20:11

Status: accepted Date: 2026-05-26

Context

IaC tools like Terraform maintain a local state file to track what exists in the target environment. This introduces a backend, a lock mechanism, and drift risk when state diverges from reality.

Decision

No statefile. No backend. No lock. The provider queries Snowflake directly to determine current state, then computes the diff against the manifest at runtime.

Consequences

  • plan is always a live diff — no stale state, no drift.
  • Zero infra to manage for state: no S3 bucket, no DynamoDB lock table.
  • Every plan makes at least one Snowflake API call — acceptable cost for correctness.
  • Parallel applies on the same manifest are not safe (no lock). Not a concern for a 1-person workflow; document clearly if multi-user adoption occurs.