How do you choose between Sentinel and OPA?
AdvancedProductionTesting and Policy as Code
Answer
Sentinel is tightly integrated with HCP Terraform, readable and has cost-estimate and run data imports, but is proprietary and works only in HashiCorp's platform. OPA is open source, uses Rego (a steeper learning curve), works everywhere (CI, Kubernetes admission, Atlantis) and HCP Terraform supports it too. If you want one policy language across Terraform and Kubernetes, choose OPA; if you are all-in on HCP Terraform and want simplicity, Sentinel is fine.
More on Testing and Policy as Code
How do you test infrastructure code, and what does the testing pyramid look like?BeginnerWhat does the static-analysis layer catch?BeginnerWhat does tflint do, and how is it configured?BeginnerHow do Checkov and Trivy differ?IntermediateHow does `terraform test` work?BeginnerHow do mock providers work in `terraform test`?Advanced