I am looking to code rego to evaluate to false when the "type" == "SOA" or "MX" #330
Replies: 5 comments 11 replies
-
Hi @sbalakrishn, there are a few things going on here. I think that you might want to use the planned_values data. I've put together a playground that uses that here: https://play.openpolicyagent.org/p/yaR5KnliJt, I've removed the other keys from the top-level object for clarity. Hope that helps, if not, let me know in more detail about where the data is in the input that you need to check and I can have another go. |
Beta Was this translation helpful? Give feedback.
-
@charlieegan3 I had one question , If you can look into this code and let me know if this would be correct to code it this way ? |
Beta Was this translation helpful? Give feedback.
-
Sorry for disturbing you once again... But I need your help..... With the code structure change the OPA code needs to be changed ,,, Can you help me with this code. : https://play.openpolicyagent.org/p/NQTQdD0jNq And I am getting the below error while I am evaluating OPA To perform exactly these actions, run the following command to apply: |
Beta Was this translation helpful? Give feedback.
-
The first few lines . { |
Beta Was this translation helpful? Give feedback.
-
@charlieegan3 -- Thanks for the help once again. I have one small question for you. I would like to take your opening on the Rego code that I have used to achieve this . such as this one >>> default allow_update = true My code can be found here : https://play.openpolicyagent.org/p/1KHmGx00S8 This code looks to do its job by I am not sure if the default value can be true instead of false -- generally I have seen them setting it to false need your confirmation default allow_update := true |
Beta Was this translation helpful? Give feedback.
-
Need Help !!! In Rego coding ...
I am looking to code rego to evaluate to false when the record "type" == "SOA" or "MX"
and true when they are not "SOA" and "MX"
But it is always evaluating to true even while I am using "!=" symbol
Shared the link below.
https://play.openpolicyagent.org/p/DEo9jsiDIX
Beta Was this translation helpful? Give feedback.
All reactions