Infrastructure as Code (IaC) drift happens when the state of your deployed resources no longer matches the code that defines them. It can creep in through manual changes, outdated pipelines, or hidden dependencies. Detecting it fast is the difference between control and chaos.
PGCLI, the Postgres command-line client, is a sharp tool in this fight. It gives instant, auto-completed visibility into PostgreSQL databases—schema, tables, queries, roles—so you can see exactly what exists now, not what you think exists. For teams using IaC to provision Postgres instances, PGCLI becomes a quick-read scanner for unexpected changes.
IaC drift detection with PGCLI works like this: pull defined state from your Terraform, Pulumi, or CloudFormation files; connect to the actual Postgres instance with PGCLI; compare schema, indexes, and configuration. Any mismatch is drift. No guessing, no stale dashboards—just raw truth from the database itself.