policy as code

Writing organisational rules, such as required tags or allowed regions, as code that automatically checks every proposed change.

In more detail

Rules kept as code can be reviewed, versioned and tested like any other code, and a pipeline can enforce them on every change instead of relying on people to remember. Open Policy Agent and HashiCorp Sentinel are common engines.

Examples

The course keeps accepted builders, required checks, scanner gates and exception expiry in policy code reviewed like any production change.
In Terraform: In a Terraform pipeline the policy engine reads the plan as JSON and rejects changes that break a rule, before anyone applies them. Open Policy Agent and HashiCorp Sentinel are common engines.

Related terms

Taught in

References

Certification courses