Skip to content

AMBA remediation

Applying the foundation assigns the AMBA DeployIfNotExists policies but does not deploy the action group or the alerts. DeployIfNotExists never touches resources that already exist until a remediation task runs.

Check the resource providers first. Every subscription in scope needs Microsoft.AlertsManagement and microsoft.insights registered, or the Deploy-AMBA-Notification remediation fails with MissingSubscriptionRegistration and no alert reaches the action group. The landing-zones unit registers them on the platform subscriptions, and each lz-vending unit on its landing zone (Foundation units).

az provider show -n Microsoft.AlertsManagement --subscription <subscription-id> --query registrationState

Trigger a compliance scan per subscription first:

az policy state trigger-scan --subscription <subscription-id>

Then create a remediation task for each Deploy-AMBA-* assignment:

az policy remediation create \
  --name remediate-amba \
  --management-group <management-group-id> \
  --policy-assignment Deploy-AMBA-<name>

--resource-discovery-mode ReEvaluateCompliance is supported at subscription scope and below, not at management-group scope. That is why the order is scan the subscriptions, then remediate.

The remediation runs as the assignment's managed identity, which must already hold the RBAC role the policy needs. The foundation grants it.

Changing the Service Health recipients

A change to amba_alz_sha_action_group_resources does not reach the existing ag-ServiceHealthAlertActionGroup. The Deploy-AMBA-Res-SvcHlth policy checks only the alert rule, not the action group's receivers, so every subscription stays Compliant and a remediation task skips it. New subscriptions get the new receivers on first deploy.

For an existing subscription, delete the alert rule so the policy reports it non-compliant, then scan and remediate. The remediation redeploys the alert rule and the action group with the new receivers:

az monitor activity-log alert delete --subscription <subscription-id> \
  -g rg-amba-<region> -n ServiceHealthSubscriptionAlertRule
az policy state trigger-scan --subscription <subscription-id>
az policy remediation create --subscription <subscription-id> \
  --name remediate-amba-sha \
  --policy-assignment /providers/Microsoft.Management/managementGroups/<management-group-id>/providers/Microsoft.Authorization/policyAssignments/Deploy-AMBA-Res-SvcHlth \
  --definition-reference-id alz_sha_builtin \
  --resource-discovery-mode ReEvaluateCompliance

The subscription has no Service Health alert rule until the remediation finishes. To avoid that gap, add the receiver to the action group by hand with az monitor action-group update --add-action email. The policy never checks receivers, so a hand-added receiver does not drift.