These projects from the OPA ecosystem integrate OPA with either Terraform source code in HCL or Terraform plans in JSON.
Styra DAS has native support for the validation of Terraform code and
plans via a prebuilt ‘system-type’, this is
documented here.
Conftest has generic support for Terraform source files defined in HCL.
There is an example provided here on
GitHub.
env0 is a Terraform automation platform that allows you to manage your
infrastructure as code (IaC) at scale. It has a built-in integration with
OPA. See docs
here.
These policies can be run using OPA at the command line against a
Terraform plan JSON. See
the example
in the README.
Spacelift supports Rego as a language to describe policies for Terraform
JSON plans.
This blog
outlines how the integration works.
Atmos can validate Terraform stack before applying them. This is done
using the
validate component
command
documented here.
Terraform cloud has native support for enforcing Rego policy on plans.
The feature is
documented here.
Integrations are ordered by the amount of linked content.