Azure Resource Policy advertises itself as:
Azure Policy helps to enforce organizational standards and to assess compliance at-scale. Through its compliance dashboard, it provides an aggregated view to evaluate the overall state of the environment, with the ability to drill down to the per-resource, per-policy granularity. It also helps to bring your resources to compliance through bulk remediation for existing resources and automatic remediation for new resources.
However Policy isn't evaluated on /delete
operations -- in our case our organizational standards require every subscription to have certain security and compliance resources deployed and present 24/7/365. Policy can report on this RG if it's absent, it can create it, but cannot do anything to prevent deletion (resulting in subscription being potentially tainted).
Why isn't Policy capable of validating that deletions don't violate standards? Is it because Policy has no context of who is performing the action?