Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
lonegunmanb committed Feb 20, 2025
1 parent 314092f commit 77ac6fe
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions policy/common/common.utils.rego
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ is_azure_type(resource, azure_type) if {
regex.match(sprintf("^%s@", [azure_type]), resource.type)
}

_get_change_after_unknown(r) := output if {
r.change.after_unknown == r.change.after_unknown
output := r.change.after_unknown
} else = []

_resource(_input) := output if {
_input.plan.resource_changes == _input.plan.resource_changes
output := {
Expand All @@ -14,7 +19,7 @@ _resource(_input) := output if {
body := {
"address": r.address,
"values": r.change.after,
"after_unknown": r.change.after_unknown,
"after_unknown": _get_change_after_unknown(r),
"mode": r.mode,
"type": r.type,
}
Expand All @@ -29,7 +34,7 @@ _resource(_input) := output if {
body := {
"address": r.address,
"values": r.change.after,
"after_unknown": r.change.after_unknown,
"after_unknown": _get_change_after_unknown(r),
"mode": r.mode,
"type": r.type,
}
Expand Down

0 comments on commit 77ac6fe

Please sign in to comment.