Full output of evaluation result
$ opa eval -d opa_tags.rego -i input.json "data.tags"
{
"result": [
{
"expressions": [
{
"value": {
"compliant": true,
"mandatory_tags": {
"contact": "^[a-z]+@company.org$",
"department": "^[a-z0-9_-]+$",
"environment": "^(development|pre-production|production)$"
},
"violation": []
},
"text": "data.tags",
"location": {
"row": 1,
"col": 1
}
}
]
}
]
}
Full output of evaluation result
$ opa eval -d opa_tags.rego -i invalid_input.json "data.tags"
{
"result": [
{
"expressions": [
{
"value": {
"compliant": false,
"mandatory_tags": {
"contact": "^[a-z]+@company.org$",
"department": "^[a-z0-9_-]+$",
"environment": "^(development|pre-production|production)$"
},
"violation": [
"tags in invalid format - contact"
]
},
"text": "data.tags",
"location": {
"row": 1,
"col": 1
}
}
]
}
]
}