How do remediation tasks and policy exemptions work?
AdvancedConceptPolicy, Cost, AWS Mapping and Rapid-fire
Answer
DeployIfNotExists and Modify only act on new or updated resources. For existing ones, create a remediation task, which runs as the assignment's managed identity (it needs the roles listed in the policy's roleDefinitionIds):
az policy remediation create -n fix-diag --policy-assignment diag-to-law \
--resource-discovery-mode ReEvaluateCompliance
Exemptions (Waiver or Mitigated categories, optional expiry) exclude a specific scope from an assignment with a documented reason, which beats creating one-off assignments with exclusions. Trigger a compliance scan with az policy state trigger-scan -g rg.
More on Policy, Cost, AWS Mapping and Rapid-fire
What is Azure Policy and what effects can a policy have?BeginnerAzure Policy vs RBAC: what is the difference?BeginnerShow an Azure Policy definition that denies public IPs on NICs.AdvancedWhat is Microsoft Defender for Cloud?IntermediateWhat tools does Azure offer for cost management?BeginnerReservations vs Savings Plans vs Spot vs Azure Hybrid Benefit.Intermediate