Skip to content

Commit

Permalink
fix rule
Browse files Browse the repository at this point in the history
  • Loading branch information
lonegunmanb committed Jan 24, 2025
1 parent ccd10bf commit a160a92
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ deny[reason] {
resource := tfplan.resource_changes[_]
resource.mode == "managed"
resource.type == "azapi_resource"
data.utils.azapi_resource_type_equals(resource.change.after, "Microsoft.Network/applicationGateways")
regex.match(`^Microsoft.Network/applicationGateways@`, resource.change.after.type)
data.utils.is_create_or_update(resource.change.actions)
not valid_azapi_sku(resource)

Expand Down
6 changes: 0 additions & 6 deletions policy/common/avm.utils.rego
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,4 @@ tfplan(d) = output {
tfplan(d) = output {
not d.plan.resource_changes
output := d
}

azapi_resource_type_equals(resource, type) {
regex.match(sprintf(`^%s@`, type), resource.type)
} else = false {
true
}

0 comments on commit a160a92

Please sign in to comment.