This guide focuses on how to validate the JSON output
form of
terraform plan
using CUE as a policy language.
There are two variants of the guide:
- Variant 1: is a CUE translation of an existing Open Policy Agent
tutorial. This
results in some un-idiomatic CUE and
cue
CLI usage. - Variant 2: uses more idiomatic CUE to assert a slightly different set of policies from the first variant.