How To
Inline policies (conftest)
This is the most basic way to use OPA policies with Digger. For more advanced use cases check out OPA policies
You can configure Digger CLI to run Conftest ito check your Terraform plan output against Open Policy Agent policies.
Pre-requisites
-
Conftest binary needs to be installed into your CI pipeline (see Conftest Docs)
-
OPA policies (rego files) under
/policies
directory in your repo
Digger.yml configuration
Example assumes the terraform is in the prod
directory.
Don’t forget to update the json file name as well if your directory is named differently