Policy as Code
ELI5 — The Vibe Check
Policy as Code means writing your rules and compliance requirements as actual code that gets enforced automatically. Instead of a wiki page saying 'all S3 buckets must be encrypted,' you write a policy that blocks unencrypted buckets from being created. The rules enforce themselves. No more 'oops, forgot to check' moments.
Real Talk
Policy as Code (PaC) is the practice of defining organizational policies — security, compliance, operational standards — as version-controlled, testable code. Tools include Open Policy Agent (OPA), HashiCorp Sentinel, AWS Config Rules, and Checkov. Policies are evaluated during CI/CD, infrastructure provisioning, or at runtime to enforce guardrails automatically.
When You'll Hear This
"Our OPA policies prevent anyone from deploying a container running as root." / "Policy as Code catches compliance violations in CI before they reach production."
Related Terms
Compliance
Compliance — pheeew, who needs it? Well, regulators. And lawyers. And anyone who doesn't want a multi-million dollar fine. If you don't know what it means,
Infrastructure as Code
ClickOps means building your cloud infrastructure by clicking buttons in AWS console.
OPA (Open Policy Agent)
OPA is an open-source policy engine that lets you write rules in a language called Rego. 'Can this user access this resource?
Sentinel
Sentinel is HashiCorp's policy engine for their tools — Terraform, Vault, Consul, Nomad.