Skip to content
SPECIFICTION
Get listed

Open Policy Agent vs Terraform

Open Policy Agent

openpolicyagent.org

Terraform

developer.hashicorp.com

Side by side

FigureOpen Policy AgentTerraform
Price fromFree$0.10/mo
Free planYesYes
Free trial—Yes
Open source——
WebYesYes
WindowsYesYes
macOSYesYes
LinuxYesYes
APIYesYes
Self-hostedYesYes
Plans published110
Spec score · Infrastructure Policy as Code Tools8.2 (#8)8.7 (#4)
IntegrationsThe project lists integrations for Kubernetes, Terraform, Envoy, and code editors.HashiCorp lists integrations for AI and MCP servers, audit, CI/CD, VCS, security scanning, policy, cost management, SSO, observability, and multi-cloud platforms.
PurposeOPA is an open-source, general-purpose policy engine that unifies policy enforcement across software systems.Terraform is an infrastructure-as-code tool for defining, provisioning, and managing cloud and on-premises resources through human-readable configuration files.

Plans

Open Policy Agent

  • Open Policy AgentFree

Open Policy Agent pricing →

Terraform

  • FreeFree
  • StandardPriced on request
  • PremiumPriced on request
  • HCP Terraform FreeFree
  • Terraform Community EditionFree
  • HCP Terraform Essentials$0.10 a month
  • HCP Terraform Standard$0.47 a month
  • HCP Terraform Premium$0.99 a month
  • EssentialsPrice not published
  • Terraform EnterprisePriced on request

Terraform pricing →

In their own words

Open Policy Agent

Open Policy Agent (OPA) is a free, open-source policy engine that separates policy decisions from the systems that enforce them. It evaluates policies against structured input and can return structured data, making it applicable to microservices, Kubernetes, CI/CD pipelines, and API gateways. Policies use Rego, a declarative language for complex hierarchical data. Applications can request evaluations through a REST API, Go API, WebAssembly runtimes, or custom evaluators using OPA's intermediate representation. Bundles distribute policy and data to OPA instances, while discovery bundles carry configuration. Management interfaces support policy distribution, health and status checks, and decision logs. Listed integrations include Kubernetes, Terraform, Envoy, and code editors; the documentation recommends OPA Gatekeeper for Kubernetes admission control. Installation options cover macOS, Linux/Unix, Windows, and Docker. OPA's security guidance says API authentication and authorization are off by default and recommends configuring TLS, authentication, and authorization when securing the API. OPA is a graduated Cloud Native Computing Foundation project.

Visit openpolicyagent.org

Terraform

Terraform is an infrastructure-as-code tool for defining, provisioning, and managing cloud and on-premises resources through human-readable configuration files. Its core process is to write a configuration, review an execution plan, then apply approved changes. Providers connect Terraform to services through APIs, and the Terraform Registry lists providers for AWS, Azure, Google Cloud, Kubernetes, GitHub, and Splunk. Modules package reusable infrastructure configurations that users can find or publish in the Registry. The free Community Edition is a downloadable command-line tool. HCP Terraform adds remote execution, repository connections to GitHub, GitLab, and Bitbucket that can trigger plans after changes, and an API. It stores state remotely with encryption at rest and offers workspaces, single sign-on, and role-based access controls. HCP Terraform and Terraform Enterprise support Sentinel policies. HashiCorp cautions that policy-as-code is a guardrail, not a security boundary, and trusted providers and modules matter because they can access workspace variables and state. Downloads are available for Windows, macOS, and Linux.

Visit developer.hashicorp.com