This example shows how OPA works with Terraform plans
opa eval --format pretty --data terraform.rego --input tfplan.json "data.terraform"
"instance_type": "t3.micro"
{
"deny": [
"Instance type t3.micro not allowed."
],
"it_types": [
"t2.micro"
]
}
"instance_type": "t2.micro"
{
"deny": [],
"it_types": [
"t2.micro"
]
}