Test policies
You can write tests for policies written for the Sentinel and Terraform policy framework. Policy tests help you verify that your policies work as expected before you enforce them with HCP Terraform. Learn how policy tests can help you deploy and update policies across your organization.
Introduction
Terraform policy and Sentinel both support policy tests, which you can use to verify new policies and changes to existing policies before enforcing them in your HCP Terraform organization.
To learn how to implement policy tests with Sentinel, refer to Generate mock Sentinel data with HCP Terraform.
To learn how to implement policy tests with Terraform policy, refer to Test Terraform policies.