Forum Discussion
ilik0
Aug 03, 2022Brass Contributor
How to create an action group in each subscription?
Hi all, I have been tasked to create an https://azure.microsoft.com/en-us/updates/azure-advisor-recommendation-digests-now-availab/ which would send an email to the subscription owner every 30 da...
Kidd_Ip
Nov 02, 2026MVP
Seems you are in the right track:
{
"properties": {
"displayName": "Deploy Action Group for each subscription",
"mode": "Indexed",
"description": "Ensures an Action Group exists in every subscription.",
"metadata": {
"category": "Monitor"
},
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.Insights/actionGroups"
},
"then": {
"effect": "DeployIfNotExists",
"details": {
"type": "Microsoft.Insights/actionGroups",
"existenceCondition": {
"field": "name",
"equals": "Default-Advisor-AG"
},
"deployment": {
"properties": {
"mode": "incremental",
"template": {
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json",
"contentVersion": "1.0.0.0",
"resources": [
{
"type": "Microsoft.Insights/actionGroups",
"apiVersion": "2022-06-01",
"name": "Default-Advisor-AG",
"location": "global",
"properties": {
"groupShortName": "AdvisorAG",
"enabled": true,
"emailReceivers": [
{
"name": "SubscriptionOwner",
"emailAddress": "[parameters('ownerEmail')]"
}
]
}
}
]
}
}
}
}
}
}
}
}