Using Open Policy Agent (OPA) with Terraform: Tutorial and Examples [2026]
Infrastructure as Code (IaC) solves the provisioning problem. It doesn't solve the governance problem. You can version your Terraform configuration, run it in a pipeline, review every pull request — and still deploy an S3 bucket with public access, a VM with no encryption, or a resource that exceeds your cost budget. Nothing in the standard IaC workflow checks for those things. The reviewer has to know what to look for. And they won't catch it every time. Policy as Code changes that.