-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs terraform output does not match actual and does not show CI #7388
Comments
- removed live output at it appeared to cause confusion here: #7388 - Updated outputs to be raw examples as you see from exec commands - Updated rego code examples too Signed-off-by: Charlie Egan <[email protected]>
Hey, in #7429 I have made a few updates to the terraform docs page you have been having issues with. I hope it'll be clearer for users in the future now. In OPA's exec command, the --fail flag causes the command to exit with a non-zero code for undefined results, --fail-defined inverts this behavior by exiting with non-zero code for defined results, and --fail-non-empty exits with non-zero code when results are non-empty arrays. Might some examples like this have helped? or did you have something else in mind? example file:
--fail-defined with true result, == 1 exit code.
--fail-defined with undefined result, == 0 exit code.
--fail-non-empty with undefined == 0 exit.
--fail-non-empty non empty list with == 1.
--fail-non-empty with empty == 0 exit code.
|
Hi, I'm new to OPA and I am not getting the desired outcome from it just yet.
On the https://www.openpolicyagent.org/docs/latest/terraform/ page,
When I run the opa exec command, I do not get the one word "true" output, instead I get a json.
I would also expect the opa command line tool to return a non-zero exit code when the policy fails.
I added the --fail parameter, to no effect and the --fail-defined and --fail-non-empty fail even when the policy checks pass. Clearly I do not understand those parameters and their intended behaviour.
So my question are:
The text was updated successfully, but these errors were encountered: