These projects from the OPA ecosystem integrate OPA with either Terraform source code in HCL or Terraform plans in JSON.
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.
Conftest has generic support for Terraform source files defined in HCL. There is an example provided here on GitHub.
Torque supports Terraform policy enforcement and defines some sample policies here.
Spacelift supports Rego as a language to describe policies for Terraform JSON plans. This blog outlines how the integration works.
These policies can be run using OPA at the command line against a Terraform plan JSON. See the example in the README.
Terraform cloud has native support for enforcing Rego policy on plans. The feature is documented here.
Atmos can validate Terraform stack before applying them. This is done
using the validate component
command
documented here.