Skip to content

Rego code samples⚓︎

Rego is a declarative policy-as-code language from the creators of the Open Policy Agent (OPA) engine. I've written quite a lot of Rego policies to check infrastructure-as-code! Some rules were incorporated into the Fugue policy library. I also wrote most of the custom rules in Fugue's example custom rules repository. Here is a small selection of policies for use with Fugue:

Simple custom rules:

Advanced custom rules:


Interested in learning Rego? Check out my Rego 101 blog post series.