Introduction
This article provides a solution for an issue where Open Policy Agent (OPA) policy checks do not trigger in specific versions of Terraform Enterprise.
Problem
The OPA policy check task does not trigger on a workspace.
Prerequisites
- Terraform Enterprise versions
v202303-1orv202304-1. - Administrator access to the Terraform Enterprise instance.
Cause
In Terraform Enterprise versions v202303-1 and v202304-1, the required OPA tool versions are not automatically included. This issue was resolved in version v202305-1.
Solutions
Solution 1: Manually Add OPA Tool Versions
To resolve this issue, you must manually add the OPA tool version to your Terraform Enterprise instance.
- Navigate to the OPA Versions administration page at
https://<YOUR_TFE_URL>/app/admin/opa-versions. - Follow the instructions in the official documentation to Add Open Policy Agent (OPA) Tool Versions.
Outcome
After you add the OPA tool version to Terraform Enterprise, the policy check task will trigger as expected during runs.