Problem
When using Terraform 0.15.0 or newer in a Terraform Enterprise instance on version v202103-3 or earlier, Sentinel policy checks fail during the plan phase. The run displays the following error message.
An error occurred: unsupported provider schema data format version: expected "0.1", got "0.2"
Cause
Terraform 0.15.0 introduced changes to the provider schema format generated for Sentinel mocks. Sentinel versions prior to 0.18.0 do not support this new schema format.
Terraform Enterprise version v202103-3 and earlier bundle a version of Sentinel older than 0.18.0. This incompatibility causes the policy check to fail when processing the plan data from a Terraform 0.15.0+ run.
Solution
To resolve this issue, you must upgrade your Terraform Enterprise instance to version v202104-1 or a later release. These versions include Sentinel 0.18.0 or newer, which provides the necessary support for the updated provider schema from Terraform 0.15.0 and above.
For detailed instructions, please refer to the official documentation on upgrading a Terraform Enterprise instance.