This is a Rego Playground Share
Created
July 17, 2025 17:00
-
-
Save tsandall/bf3592bd38cb66595840e8cad5fbaff1 to your computer and use it in GitHub Desktop.
Rego Playground
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"message":"world"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"trace":false,"coverage":false,"strict":false,"read_only":true,"rego_version":1} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package play | |
# Welcome to the Rego playground! Rego (pronounced "ray-go") is OPA's policy language. | |
# | |
# Try it out: | |
# | |
# 1. Click Evaluate. Note: 'hello' is 'true' | |
# 2. Change "world" to "hello" in the INPUT panel. Click Evaluate. Note: 'hello' is 'false' | |
# 3. Change "world" to "hello" on line 25 in the editor. Click Evaluate. Note: 'hello' is 'true' | |
# | |
# Features: | |
# | |
# Examples browse a collection of example policies | |
# Coverage view the policy statements that were executed | |
# Evaluate execute the policy with INPUT and DATA | |
# Publish share your playground and experiment with local deployment | |
# INPUT edit the JSON value your policy sees under the 'input' global variable | |
# (resize) DATA edit the JSON value your policy sees under the 'data' global variable | |
# OUTPUT view the result of policy execution | |
default hello := false | |
hello if input.message == "world" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment