From d57b2063995af3d31dfd51be3688ce8b83dfef8d Mon Sep 17 00:00:00 2001 From: Brunoga-MS Date: Wed, 11 Dec 2024 18:42:09 +0100 Subject: [PATCH] Updating version --- .../alz/policyDefinitions/policies-NotificationAssets.json | 4 ++-- .../actionRules/Deploy-AlertProcessingRule-Deploy.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/patterns/alz/policyDefinitions/policies-NotificationAssets.json b/patterns/alz/policyDefinitions/policies-NotificationAssets.json index 7513d0eb..ae5b91d0 100644 --- a/patterns/alz/policyDefinitions/policies-NotificationAssets.json +++ b/patterns/alz/policyDefinitions/policies-NotificationAssets.json @@ -5,7 +5,7 @@ "_generator": { "name": "bicep", "version": "0.19.5.34762", - "templateHash": "15369558940474625070" + "templateHash": "5021134162092004695" } }, "parameters": { @@ -115,7 +115,7 @@ "input": "[json(variables('processPolicySetDefinitionsAzureUSGovernment')[copyIndex('policySetDefinitionsAzureUSGovernment')])]" } ], - "$fxv#0": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_AlertProcessing_Rule\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy AMBA Notification Assets\",\n \"description\": \"Policy to deploy Action Group and Alert Processing Rule for all AMBA alerts\",\n \"metadata\": {\n \"version\": \"1.4.0\",\n \"category\": \"Monitoring\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"ALZMonitorResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"_deployed_by_amba\": true\n }\n },\n \"ALZMonitorResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"Action Group Email Addresses\",\n \"description\": \"Email addresses to send alerts to\"\n },\n \"defaultValue\": []\n },\n \"ALZLogicappResourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Logic App Resource Id\",\n \"description\": \"Logic App Resource Id for Action Group to send alerts to\"\n },\n \"defaultValue\": \"\"\n },\n \"ALZLogicappCallbackUrl\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Logic App Callback URL\",\n \"description\": \"Callback URL that triggers the Logic App\"\n },\n \"defaultValue\": \"\"\n },\n \"ALZArmRoleId\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Arm Role Ids\",\n \"description\": \"Arm Built-in Role Ids for action group to send alerts to\"\n },\n \"defaultValue\": []\n },\n \"ALZEventHubResourceId\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Event Hub resource Ids\",\n \"description\": \"Event Hub resource Ids for action group to send alerts to\"\n },\n \"defaultValue\": []\n },\n \"ALZWebhookServiceUri\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"Webhook Service Uri(s)\",\n \"description\": \"Indicates the service uri(s) of the webhook to send alerts to\"\n },\n \"defaultValue\": []\n },\n \"ALZFunctionResourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Function Resource Id\",\n \"description\": \"Function Resource Id for Action Group to send alerts to\"\n },\n \"defaultValue\": \"\"\n },\n \"ALZFunctionTriggerUrl\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Function Trigger URL\",\n \"description\": \"URL that triggers the Function\"\n },\n \"defaultValue\": \"\"\n },\n \"ALZProcessingRuleNameSuffix\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert Processing Rule Name Suffix\",\n \"description\": \"Name of the Alert Processing Rule and actionGroup suffix\"\n },\n \"defaultValue\": \"-001\"\n },\n \"ALZAlertSeverity\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"Alert Severities for Alert Processing Rule\",\n \"description\": \"Severity of the alerts to apply action groups. Will apply to all severities if not specified.\"\n },\n \"defaultValue\": [\n \"Sev0\",\n \"Sev1\",\n \"Sev2\",\n \"Sev3\",\n \"Sev4\"\n ]\n },\n \"BYOActionGroup\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Customer defined Action Group Resource IDs\",\n \"description\": \"The Resource IDs of existing Action Groups currently deployed in the environment.\"\n },\n \"defaultValue\": []\n },\n \"BYOAlertProcessingRule\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Customer defined Alert Processing Rule Resource ID\",\n \"description\": \"The Resource ID of an existing Alert Processing Rule already deployed by the customer in his environment\"\n },\n \"defaultValue\": \"\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Resources/subscriptions\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n },\n {\n \"value\": \"[[empty(parameters('BYOAlertProcessingRule'))]\",\n \"equals\": \"true\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"deployIfNotExists\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.AlertsManagement/actionRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('ALZMonitorResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.AlertsManagement/actionRules/description\",\n \"equals\": \"[[concat('apr-AMBA-', subscription().displayName, parameters('ALZProcessingRuleNameSuffix'))]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"type\": \"string\"\n },\n \"ALZProcessingRuleNameSuffix\": {\n \"type\": \"string\"\n },\n \"ALZMonitorResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"ALZMonitorResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\"\n },\n \"ALZLogicappResourceId\": {\n \"type\": \"string\"\n },\n \"ALZLogicappCallbackUrl\": {\n \"type\": \"String\"\n },\n \"ALZArmRoleId\": {\n \"type\": \"array\"\n },\n \"ALZEventHubResourceId\": {\n \"type\": \"array\"\n },\n \"ALZWebhookServiceUri\": {\n \"type\": \"Array\"\n },\n \"ALZFunctionResourceId\": {\n \"type\": \"string\"\n },\n \"ALZFunctionTriggerUrl\": {\n \"type\": \"String\"\n },\n \"ALZAlertProcessingRuleNameSuffix\": {\n \"type\": \"string\"\n },\n \"ALZAlertSeverity\": {\n \"type\": \"Array\"\n },\n \"BYOActionGroup\": {\n \"type\": \"array\"\n },\n \"BYOAlertProcessingRule\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {\n \"varBYOAlertProcessingRule\": \"[[if(empty(parameters('BYOAlertProcessingRule')), null(), trim(parameters('BYOAlertProcessingRule')))]\",\n \"varLogicAppReceivers\": [\n {\n \"name\": \"AlzLA-0\",\n \"resourceId\": \"[[if(empty(parameters('ALZLogicappResourceId')), null(), trim(parameters('ALZLogicappResourceId')))]\",\n \"callbackUrl\": \"[[if(empty(parameters('ALZLogicappCallbackUrl')), null(), trim(parameters('ALZLogicappCallbackUrl')))]\",\n \"useCommonAlertSchema\": true\n }\n ],\n \"varAzureFunctionReceivers\": [\n {\n \"name\": \"AlzFa-0\",\n \"functionAppResourceId\": \"[[if(empty(parameters('ALZFunctionResourceId')), null(), split(trim(parameters('ALZFunctionResourceId')),'/functions/')[0])]\",\n \"functionName\": \"[[if(empty(parameters('ALZFunctionResourceId')), null(), split(trim(parameters('ALZFunctionResourceId')),'/')[10])]\",\n \"httpTriggerUrl\": \"[[if(empty(parameters('ALZFunctionTriggerUrl')), null(), trim(parameters('ALZFunctionTriggerUrl')))]\",\n \"useCommonAlertSchema\": true\n }\n ],\n \"copy\": [\n {\n \"name\": \"varEmailReceivers\",\n \"count\": \"[[length(parameters('ALZMonitorActionGroupEmail'))]\",\n \"mode\": \"serial\",\n \"input\": {\n \"name\": \"[[concat('AlzMail-', indexOf(parameters('ALZMonitorActionGroupEmail'), parameters('ALZMonitorActionGroupEmail')[copyIndex('varEmailReceivers')]))]\",\n \"emailAddress\": \"[[trim(parameters('ALZMonitorActionGroupEmail')[copyIndex('varEmailReceivers')])]\",\n \"useCommonAlertSchema\": true\n }\n },\n {\n \"name\": \"varArmRoleReceivers\",\n \"count\": \"[[length(parameters('ALZArmRoleId'))]\",\n \"mode\": \"serial\",\n \"input\": {\n \"name\": \"[[concat('AlzARM-', indexOf(parameters('ALZArmRoleId'), parameters('ALZArmRoleId')[copyIndex('varArmRoleReceivers')]))]\",\n \"roleId\": \"[[trim(parameters('ALZArmRoleId')[copyIndex('varArmRoleReceivers')])]\",\n \"useCommonAlertSchema\": true\n }\n },\n {\n \"name\": \"varEventHubReceivers\",\n \"count\": \"[[length(parameters('ALZEventHubResourceId'))]\",\n \"mode\": \"serial\",\n \"input\": {\n \"name\": \"[[concat('AlzEH-', indexOf(parameters('ALZEventHubResourceId'), parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]))]\",\n \"subscriptionId\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), split(trim(parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]),'/')[2])]\",\n \"eventHubNameSpace\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), split(trim(parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]),'/')[8])]\",\n \"eventHubName\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), split(trim(parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]),'/')[10])]\",\n \"useCommonAlertSchema\": true,\n \"tenantId\": \"[[subscription().tenantId]\"\n }\n },\n {\n \"name\": \"varWebhookReceivers\",\n \"count\": \"[[length(parameters('ALZWebhookServiceUri'))]\",\n \"mode\": \"serial\",\n \"input\": {\n \"name\": \"[[concat('AlzWh-', indexOf(parameters('ALZWebhookServiceUri'), parameters('ALZWebhookServiceUri')[copyIndex('varWebhookReceivers')]))]\",\n \"identifierUri\": \"null()\",\n \"objectId\": \"null()\",\n \"serviceUri\": \"[[trim(parameters('ALZWebhookServiceUri')[copyIndex('varWebhookReceivers')])]\",\n \"useCommonAlertSchema\": true,\n \"tenantId\": \"null()\",\n \"useAadAuth\": \"false\"\n }\n },\n {\n \"name\": \"varAGIds\",\n \"count\": \"[[length(parameters('BYOActionGroup'))]\",\n \"mode\": \"serial\",\n \"input\": \"[[trim(parameters('BYOActionGroup')[copyIndex('varAGIds')])]\"\n }\n ]\n },\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('ALZMonitorResourceGroupName')]\",\n \"location\": \"[[parameters('ALZMonitorResourceGroupLocation')]\",\n \"tags\": \"[[parameters('ALZMonitorResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"ActionGroupDeployment\",\n \"resourceGroup\": \"[[parameters('ALZMonitorResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('ALZMonitorResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"type\": \"string\"\n },\n \"ALZProcessingRuleNameSuffix\": {\n \"type\": \"string\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\"\n },\n \"ALZLogicappResourceId\": {\n \"type\": \"string\"\n },\n \"ALZLogicappCallbackUrl\": {\n \"type\": \"string\"\n },\n \"ALZArmRoleId\": {\n \"type\": \"array\"\n },\n \"ALZEventHubResourceId\": {\n \"type\": \"array\"\n },\n \"ALZWebhookServiceUri\": {\n \"type\": \"Array\"\n },\n \"ALZFunctionResourceId\": {\n \"type\": \"string\"\n },\n \"ALZFunctionTriggerUrl\": {\n \"type\": \"string\"\n },\n \"ALZAlertProcessingRuleNameSuffix\": {\n \"type\": \"string\"\n },\n \"ALZAlertSeverity\": {\n \"type\": \"Array\"\n },\n \"BYOActionGroup\": {\n \"type\": \"array\"\n },\n \"BYOAlertProcessingRule\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"condition\": \"[[and(empty(parameters('BYOActionGroup')), empty(parameters('BYOAlertProcessingRule')))]\",\n \"type\": \"Microsoft.Insights/actionGroups\",\n \"apiVersion\": \"2023-01-01\",\n \"name\": \"[[concat('ag-AMBA-', subscription().displayName, parameters('ALZProcessingRuleNameSuffix'))]\",\n \"location\": \"Global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"groupShortName\": \"ActGrp\",\n \"enabled\": true,\n \"emailReceivers\": \"[[if(empty(parameters('ALZMonitorActionGroupEmail')), null(), variables('varEmailReceivers'))]\",\n \"armRoleReceivers\": \"[[if(empty(parameters('ALZArmRoleId')), null(), variables('varArmRoleReceivers'))]\",\n \"logicAppReceivers\": \"[[if(empty(parameters('ALZLogicappResourceId')), null(), variables('varLogicAppReceivers'))]\",\n \"eventHubReceivers\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), variables('varEventHubReceivers'))]\",\n \"webhookReceivers\": \"[[if(empty(parameters('ALZWebhookServiceUri')), null(), variables('varWebhookReceivers'))]\",\n \"azureFunctionReceivers\": \"[[if(empty(parameters('ALZFunctionResourceId')), null(), variables('varAzureFunctionReceivers'))]\"\n }\n },\n {\n \"condition\": \"[[empty(parameters('BYOAlertProcessingRule'))]\",\n \"type\": \"Microsoft.AlertsManagement/actionRules\",\n \"apiVersion\": \"2021-08-08\",\n \"name\": \"[[concat('apr-AMBA-',subscription().displayName, parameters('ALZProcessingRuleNameSuffix'))]\",\n \"location\": \"Global\",\n \"dependsOn\": [\n \"[[concat('ag-AMBA-', subscription().displayName, parameters('ALZProcessingRuleNameSuffix'))]\"\n ],\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"description\": \"[[concat('apr-AMBA-',subscription().displayName, parameters('ALZProcessingRuleNameSuffix'))]\",\n \"conditions\": [\n {\n \"field\": \"severity\",\n \"operator\": \"Equals\",\n \"values\": \"[[parameters('ALZAlertSeverity')]\"\n }\n ],\n \"enabled\": true,\n \"actions\": [\n {\n \"actiongroupIds\": \"[[if(empty(parameters('BYOActionGroup')), array(concat(subscription().Id, '/resourceGroups/', parameters('ALZMonitorResourceGroupName'), '/providers/microsoft.insights/actionGroups/', 'ag-AMBA-', subscription().displayName, parameters('ALZProcessingRuleNameSuffix'))), variables('varAGIds'))]\",\n \"actionType\": \"AddActionGroups\"\n }\n ]\n }\n }\n ]\n },\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupName')]\"\n },\n \"ALZProcessingRuleNameSuffix\": {\n \"value\": \"[[parameters('ALZProcessingRuleNameSuffix')]\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\n },\n \"ALZLogicappResourceId\": {\n \"value\": \"[[parameters('ALZLogicappResourceId')]\"\n },\n \"ALZLogicappCallbackUrl\": {\n \"value\": \"[[parameters('ALZLogicappCallbackUrl')]\"\n },\n \"ALZArmRoleId\": {\n \"value\": \"[[parameters('ALZArmRoleId')]\"\n },\n \"ALZEventHubResourceId\": {\n \"value\": \"[[parameters('ALZEventHubResourceId')]\"\n },\n \"ALZWebhookServiceUri\": {\n \"value\": \"[[parameters('ALZWebhookServiceUri')]\"\n },\n \"ALZFunctionResourceId\": {\n \"value\": \"[[parameters('ALZFunctionResourceId')]\"\n },\n \"ALZFunctionTriggerUrl\": {\n \"value\": \"[[parameters('ALZFunctionTriggerUrl')]\"\n },\n \"ALZAlertProcessingRuleNameSuffix\":{\n \"value\": \"[[parameters('ALZProcessingRuleNameSuffix')]\"\n },\n \"ALZAlertSeverity\": {\n \"value\": \"[[parameters('ALZAlertSeverity')]\"\n },\n \"BYOActionGroup\": {\n \"value\": \"[[parameters('BYOActionGroup')]\"\n },\n \"BYOAlertProcessingRule\": {\n \"value\": \"[[parameters('BYOAlertProcessingRule')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupName')]\"\n },\n \"ALZProcessingRuleNameSuffix\": {\n \"value\": \"[[parameters('ALZProcessingRuleNameSuffix')]\"\n },\n \"ALZMonitorResourceGroupTags\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupTags')]\"\n },\n \"ALZMonitorResourceGroupLocation\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupLocation')]\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\n },\n \"ALZLogicappResourceId\": {\n \"value\": \"[[parameters('ALZLogicappResourceId')]\"\n },\n \"ALZLogicappCallbackUrl\": {\n \"value\": \"[[parameters('ALZLogicappCallbackUrl')]\"\n },\n \"ALZArmRoleId\": {\n \"value\": \"[[parameters('ALZArmRoleId')]\"\n },\n \"ALZEventHubResourceId\": {\n \"value\": \"[[parameters('ALZEventHubResourceId')]\"\n },\n \"ALZWebhookServiceUri\": {\n \"value\": \"[[parameters('ALZWebhookServiceUri')]\"\n },\n \"ALZFunctionResourceId\": {\n \"value\": \"[[parameters('ALZFunctionResourceId')]\"\n },\n \"ALZFunctionTriggerUrl\": {\n \"value\": \"[[parameters('ALZFunctionTriggerUrl')]\"\n },\n \"ALZAlertProcessingRuleNameSuffix\":{\n \"value\": \"[[parameters('ALZProcessingRuleNameSuffix')]\"\n },\n \"ALZAlertSeverity\": {\n \"value\": \"[[parameters('ALZAlertSeverity')]\"\n },\n \"BYOActionGroup\": {\n \"value\": \"[[parameters('BYOActionGroup')]\"\n },\n \"BYOAlertProcessingRule\": {\n \"value\": \"[[parameters('BYOAlertProcessingRule')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n", + "$fxv#0": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_AlertProcessing_Rule\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy AMBA Notification Assets\",\n \"description\": \"Policy to deploy Action Group and Alert Processing Rule for all AMBA alerts\",\n \"metadata\": {\n \"version\": \"1.5.0\",\n \"category\": \"Monitoring\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"ALZMonitorResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"_deployed_by_amba\": true\n }\n },\n \"ALZMonitorResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"Action Group Email Addresses\",\n \"description\": \"Email addresses to send alerts to\"\n },\n \"defaultValue\": []\n },\n \"ALZLogicappResourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Logic App Resource Id\",\n \"description\": \"Logic App Resource Id for Action Group to send alerts to\"\n },\n \"defaultValue\": \"\"\n },\n \"ALZLogicappCallbackUrl\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Logic App Callback URL\",\n \"description\": \"Callback URL that triggers the Logic App\"\n },\n \"defaultValue\": \"\"\n },\n \"ALZArmRoleId\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Arm Role Ids\",\n \"description\": \"Arm Built-in Role Ids for action group to send alerts to\"\n },\n \"defaultValue\": []\n },\n \"ALZEventHubResourceId\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Event Hub resource Ids\",\n \"description\": \"Event Hub resource Ids for action group to send alerts to\"\n },\n \"defaultValue\": []\n },\n \"ALZWebhookServiceUri\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"Webhook Service Uri(s)\",\n \"description\": \"Indicates the service uri(s) of the webhook to send alerts to\"\n },\n \"defaultValue\": []\n },\n \"ALZFunctionResourceId\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Function Resource Id\",\n \"description\": \"Function Resource Id for Action Group to send alerts to\"\n },\n \"defaultValue\": \"\"\n },\n \"ALZFunctionTriggerUrl\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Function Trigger URL\",\n \"description\": \"URL that triggers the Function\"\n },\n \"defaultValue\": \"\"\n },\n \"ALZProcessingRuleNameSuffix\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Alert Processing Rule Name Suffix\",\n \"description\": \"Name of the Alert Processing Rule and actionGroup suffix\"\n },\n \"defaultValue\": \"-001\"\n },\n \"ALZAlertSeverity\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"Alert Severities for Alert Processing Rule\",\n \"description\": \"Severity of the alerts to apply action groups. Will apply to all severities if not specified.\"\n },\n \"defaultValue\": [\n \"Sev0\",\n \"Sev1\",\n \"Sev2\",\n \"Sev3\",\n \"Sev4\"\n ]\n },\n \"BYOActionGroup\": {\n \"type\": \"array\",\n \"metadata\": {\n \"displayName\": \"Customer defined Action Group Resource IDs\",\n \"description\": \"The Resource IDs of existing Action Groups currently deployed in the environment.\"\n },\n \"defaultValue\": []\n },\n \"BYOAlertProcessingRule\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Customer defined Alert Processing Rule Resource ID\",\n \"description\": \"The Resource ID of an existing Alert Processing Rule already deployed by the customer in his environment\"\n },\n \"defaultValue\": \"\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name to disable monitoring. Set to true if monitoring should be disabled\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Resources/subscriptions\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n },\n {\n \"value\": \"[[empty(parameters('BYOAlertProcessingRule'))]\",\n \"equals\": \"true\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"deployIfNotExists\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.AlertsManagement/actionRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('ALZMonitorResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.AlertsManagement/actionRules/description\",\n \"equals\": \"[[concat('apr-AMBA-', subscription().displayName, parameters('ALZProcessingRuleNameSuffix'))]\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"type\": \"string\"\n },\n \"ALZProcessingRuleNameSuffix\": {\n \"type\": \"string\"\n },\n \"ALZMonitorResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"ALZMonitorResourceGroupLocation\": {\n \"type\": \"string\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\"\n },\n \"ALZLogicappResourceId\": {\n \"type\": \"string\"\n },\n \"ALZLogicappCallbackUrl\": {\n \"type\": \"String\"\n },\n \"ALZArmRoleId\": {\n \"type\": \"array\"\n },\n \"ALZEventHubResourceId\": {\n \"type\": \"array\"\n },\n \"ALZWebhookServiceUri\": {\n \"type\": \"Array\"\n },\n \"ALZFunctionResourceId\": {\n \"type\": \"string\"\n },\n \"ALZFunctionTriggerUrl\": {\n \"type\": \"String\"\n },\n \"ALZAlertProcessingRuleNameSuffix\": {\n \"type\": \"string\"\n },\n \"ALZAlertSeverity\": {\n \"type\": \"Array\"\n },\n \"BYOActionGroup\": {\n \"type\": \"array\"\n },\n \"BYOAlertProcessingRule\": {\n \"type\": \"String\"\n }\n },\n \"variables\": {\n \"varBYOAlertProcessingRule\": \"[[if(empty(parameters('BYOAlertProcessingRule')), null(), trim(parameters('BYOAlertProcessingRule')))]\",\n \"varLogicAppReceivers\": [\n {\n \"name\": \"AlzLA-0\",\n \"resourceId\": \"[[if(empty(parameters('ALZLogicappResourceId')), null(), trim(parameters('ALZLogicappResourceId')))]\",\n \"callbackUrl\": \"[[if(empty(parameters('ALZLogicappCallbackUrl')), null(), trim(parameters('ALZLogicappCallbackUrl')))]\",\n \"useCommonAlertSchema\": true\n }\n ],\n \"varAzureFunctionReceivers\": [\n {\n \"name\": \"AlzFa-0\",\n \"functionAppResourceId\": \"[[if(empty(parameters('ALZFunctionResourceId')), null(), split(trim(parameters('ALZFunctionResourceId')),'/functions/')[0])]\",\n \"functionName\": \"[[if(empty(parameters('ALZFunctionResourceId')), null(), split(trim(parameters('ALZFunctionResourceId')),'/')[10])]\",\n \"httpTriggerUrl\": \"[[if(empty(parameters('ALZFunctionTriggerUrl')), null(), trim(parameters('ALZFunctionTriggerUrl')))]\",\n \"useCommonAlertSchema\": true\n }\n ],\n \"copy\": [\n {\n \"name\": \"varEmailReceivers\",\n \"count\": \"[[length(parameters('ALZMonitorActionGroupEmail'))]\",\n \"mode\": \"serial\",\n \"input\": {\n \"name\": \"[[concat('AlzMail-', indexOf(parameters('ALZMonitorActionGroupEmail'), parameters('ALZMonitorActionGroupEmail')[copyIndex('varEmailReceivers')]))]\",\n \"emailAddress\": \"[[trim(parameters('ALZMonitorActionGroupEmail')[copyIndex('varEmailReceivers')])]\",\n \"useCommonAlertSchema\": true\n }\n },\n {\n \"name\": \"varArmRoleReceivers\",\n \"count\": \"[[length(parameters('ALZArmRoleId'))]\",\n \"mode\": \"serial\",\n \"input\": {\n \"name\": \"[[concat('AlzARM-', indexOf(parameters('ALZArmRoleId'), parameters('ALZArmRoleId')[copyIndex('varArmRoleReceivers')]))]\",\n \"roleId\": \"[[trim(parameters('ALZArmRoleId')[copyIndex('varArmRoleReceivers')])]\",\n \"useCommonAlertSchema\": true\n }\n },\n {\n \"name\": \"varEventHubReceivers\",\n \"count\": \"[[length(parameters('ALZEventHubResourceId'))]\",\n \"mode\": \"serial\",\n \"input\": {\n \"name\": \"[[concat('AlzEH-', indexOf(parameters('ALZEventHubResourceId'), parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]))]\",\n \"subscriptionId\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), split(trim(parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]),'/')[2])]\",\n \"eventHubNameSpace\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), split(trim(parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]),'/')[8])]\",\n \"eventHubName\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), split(trim(parameters('ALZEventHubResourceId')[copyIndex('varEventHubReceivers')]),'/')[10])]\",\n \"useCommonAlertSchema\": true,\n \"tenantId\": \"[[subscription().tenantId]\"\n }\n },\n {\n \"name\": \"varWebhookReceivers\",\n \"count\": \"[[length(parameters('ALZWebhookServiceUri'))]\",\n \"mode\": \"serial\",\n \"input\": {\n \"name\": \"[[concat('AlzWh-', indexOf(parameters('ALZWebhookServiceUri'), parameters('ALZWebhookServiceUri')[copyIndex('varWebhookReceivers')]))]\",\n \"identifierUri\": \"null()\",\n \"objectId\": \"null()\",\n \"serviceUri\": \"[[trim(parameters('ALZWebhookServiceUri')[copyIndex('varWebhookReceivers')])]\",\n \"useCommonAlertSchema\": true,\n \"tenantId\": \"null()\",\n \"useAadAuth\": \"false\"\n }\n },\n {\n \"name\": \"varAGIds\",\n \"count\": \"[[length(parameters('BYOActionGroup'))]\",\n \"mode\": \"serial\",\n \"input\": \"[[trim(parameters('BYOActionGroup')[copyIndex('varAGIds')])]\"\n }\n ]\n },\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('ALZMonitorResourceGroupName')]\",\n \"location\": \"[[parameters('ALZMonitorResourceGroupLocation')]\",\n \"tags\": \"[[parameters('ALZMonitorResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"ActionGroupDeployment\",\n \"resourceGroup\": \"[[parameters('ALZMonitorResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('ALZMonitorResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"type\": \"string\"\n },\n \"ALZProcessingRuleNameSuffix\": {\n \"type\": \"string\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"type\": \"Array\"\n },\n \"ALZLogicappResourceId\": {\n \"type\": \"string\"\n },\n \"ALZLogicappCallbackUrl\": {\n \"type\": \"string\"\n },\n \"ALZArmRoleId\": {\n \"type\": \"array\"\n },\n \"ALZEventHubResourceId\": {\n \"type\": \"array\"\n },\n \"ALZWebhookServiceUri\": {\n \"type\": \"Array\"\n },\n \"ALZFunctionResourceId\": {\n \"type\": \"string\"\n },\n \"ALZFunctionTriggerUrl\": {\n \"type\": \"string\"\n },\n \"ALZAlertProcessingRuleNameSuffix\": {\n \"type\": \"string\"\n },\n \"ALZAlertSeverity\": {\n \"type\": \"Array\"\n },\n \"BYOActionGroup\": {\n \"type\": \"array\"\n },\n \"BYOAlertProcessingRule\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"condition\": \"[[and(empty(parameters('BYOActionGroup')), empty(parameters('BYOAlertProcessingRule')))]\",\n \"type\": \"Microsoft.Insights/actionGroups\",\n \"apiVersion\": \"2023-01-01\",\n \"name\": \"[[concat('ag-AMBA-', subscription().displayName, parameters('ALZProcessingRuleNameSuffix'))]\",\n \"location\": \"Global\",\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"groupShortName\": \"ActGrp\",\n \"enabled\": true,\n \"emailReceivers\": \"[[if(empty(parameters('ALZMonitorActionGroupEmail')), null(), variables('varEmailReceivers'))]\",\n \"armRoleReceivers\": \"[[if(empty(parameters('ALZArmRoleId')), null(), variables('varArmRoleReceivers'))]\",\n \"logicAppReceivers\": \"[[if(empty(parameters('ALZLogicappResourceId')), null(), variables('varLogicAppReceivers'))]\",\n \"eventHubReceivers\": \"[[if(empty(parameters('ALZEventHubResourceId')), null(), variables('varEventHubReceivers'))]\",\n \"webhookReceivers\": \"[[if(empty(parameters('ALZWebhookServiceUri')), null(), variables('varWebhookReceivers'))]\",\n \"azureFunctionReceivers\": \"[[if(empty(parameters('ALZFunctionResourceId')), null(), variables('varAzureFunctionReceivers'))]\"\n }\n },\n {\n \"condition\": \"[[empty(parameters('BYOAlertProcessingRule'))]\",\n \"type\": \"Microsoft.AlertsManagement/actionRules\",\n \"apiVersion\": \"2021-08-08\",\n \"name\": \"[[concat('apr-AMBA-',subscription().displayName, parameters('ALZProcessingRuleNameSuffix'))]\",\n \"location\": \"Global\",\n \"dependsOn\": [\n \"[[concat('ag-AMBA-', subscription().displayName, parameters('ALZProcessingRuleNameSuffix'))]\"\n ],\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"description\": \"[[concat('apr-AMBA-',subscription().displayName, parameters('ALZProcessingRuleNameSuffix'))]\",\n \"conditions\": [\n {\n \"field\": \"severity\",\n \"operator\": \"Equals\",\n \"values\": \"[[parameters('ALZAlertSeverity')]\"\n }\n ],\n \"enabled\": true,\n \"actions\": [\n {\n \"actiongroupIds\": \"[[if(empty(parameters('BYOActionGroup')), array(concat(subscription().Id, '/resourceGroups/', parameters('ALZMonitorResourceGroupName'), '/providers/microsoft.insights/actionGroups/', 'ag-AMBA-', subscription().displayName, parameters('ALZProcessingRuleNameSuffix'))), variables('varAGIds'))]\",\n \"actionType\": \"AddActionGroups\"\n }\n ]\n }\n }\n ]\n },\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupName')]\"\n },\n \"ALZProcessingRuleNameSuffix\": {\n \"value\": \"[[parameters('ALZProcessingRuleNameSuffix')]\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\n },\n \"ALZLogicappResourceId\": {\n \"value\": \"[[parameters('ALZLogicappResourceId')]\"\n },\n \"ALZLogicappCallbackUrl\": {\n \"value\": \"[[parameters('ALZLogicappCallbackUrl')]\"\n },\n \"ALZArmRoleId\": {\n \"value\": \"[[parameters('ALZArmRoleId')]\"\n },\n \"ALZEventHubResourceId\": {\n \"value\": \"[[parameters('ALZEventHubResourceId')]\"\n },\n \"ALZWebhookServiceUri\": {\n \"value\": \"[[parameters('ALZWebhookServiceUri')]\"\n },\n \"ALZFunctionResourceId\": {\n \"value\": \"[[parameters('ALZFunctionResourceId')]\"\n },\n \"ALZFunctionTriggerUrl\": {\n \"value\": \"[[parameters('ALZFunctionTriggerUrl')]\"\n },\n \"ALZAlertProcessingRuleNameSuffix\":{\n \"value\": \"[[parameters('ALZProcessingRuleNameSuffix')]\"\n },\n \"ALZAlertSeverity\": {\n \"value\": \"[[parameters('ALZAlertSeverity')]\"\n },\n \"BYOActionGroup\": {\n \"value\": \"[[parameters('BYOActionGroup')]\"\n },\n \"BYOAlertProcessingRule\": {\n \"value\": \"[[parameters('BYOAlertProcessingRule')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupName')]\"\n },\n \"ALZProcessingRuleNameSuffix\": {\n \"value\": \"[[parameters('ALZProcessingRuleNameSuffix')]\"\n },\n \"ALZMonitorResourceGroupTags\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupTags')]\"\n },\n \"ALZMonitorResourceGroupLocation\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupLocation')]\"\n },\n \"ALZMonitorActionGroupEmail\": {\n \"value\": \"[[parameters('ALZMonitorActionGroupEmail')]\"\n },\n \"ALZLogicappResourceId\": {\n \"value\": \"[[parameters('ALZLogicappResourceId')]\"\n },\n \"ALZLogicappCallbackUrl\": {\n \"value\": \"[[parameters('ALZLogicappCallbackUrl')]\"\n },\n \"ALZArmRoleId\": {\n \"value\": \"[[parameters('ALZArmRoleId')]\"\n },\n \"ALZEventHubResourceId\": {\n \"value\": \"[[parameters('ALZEventHubResourceId')]\"\n },\n \"ALZWebhookServiceUri\": {\n \"value\": \"[[parameters('ALZWebhookServiceUri')]\"\n },\n \"ALZFunctionResourceId\": {\n \"value\": \"[[parameters('ALZFunctionResourceId')]\"\n },\n \"ALZFunctionTriggerUrl\": {\n \"value\": \"[[parameters('ALZFunctionTriggerUrl')]\"\n },\n \"ALZAlertProcessingRuleNameSuffix\":{\n \"value\": \"[[parameters('ALZProcessingRuleNameSuffix')]\"\n },\n \"ALZAlertSeverity\": {\n \"value\": \"[[parameters('ALZAlertSeverity')]\"\n },\n \"BYOActionGroup\": {\n \"value\": \"[[parameters('BYOActionGroup')]\"\n },\n \"BYOAlertProcessingRule\": {\n \"value\": \"[[parameters('BYOAlertProcessingRule')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n", "$fxv#1": "{\n \"type\": \"Microsoft.Authorization/policyDefinitions\",\n \"apiVersion\": \"2021-06-01\",\n \"name\": \"Deploy_Suppression_AlertProcessing_Rule\",\n \"properties\": {\n \"policyType\": \"Custom\",\n \"mode\": \"All\",\n \"displayName\": \"Deploy AMBA Notification Suppression Asset\",\n \"description\": \"Policy to deploy empty and disabled suppression Alert Processing Rule for all AMBA alerts\",\n \"metadata\": {\n \"version\": \"1.1.0\",\n \"category\": \"Monitoring\",\n \"source\": \"https://github.com/Azure/azure-monitor-baseline-alerts/\",\n \"alzCloudEnvironments\": [\n \"AzureCloud\"\n ],\n \"_deployed_by_amba\": \"True\"\n },\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Name\",\n \"description\": \"Resource group the alert is placed in\"\n },\n \"defaultValue\": \"rg-amba-monitoring-001\"\n },\n \"ALZMonitorResourceGroupTags\": {\n \"type\": \"Object\",\n \"metadata\": {\n \"displayName\": \"Resource Group Tags\",\n \"description\": \"Tags on the Resource group the alert is placed in\"\n },\n \"defaultValue\": {\n \"_deployed_by_amba\": true\n }\n },\n \"ALZMonitorResourceGroupLocation\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"Resource Group Location\",\n \"description\": \"Location of the Resource group the alert is placed in\"\n },\n \"defaultValue\": \"centralus\"\n },\n \"MonitorDisableTagName\": {\n \"type\": \"String\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag name\",\n \"description\": \"Tag name used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": \"MonitorDisable\"\n },\n \"MonitorDisableTagValues\": {\n \"type\": \"Array\",\n \"metadata\": {\n \"displayName\": \"ALZ Monitoring disabled tag values(s)\",\n \"description\": \"Tag value(s) used to disable monitoring at the resource level. Set to true if monitoring should be disabled.\"\n },\n \"defaultValue\": [\n \"true\",\n \"Test\",\n \"Dev\",\n \"Sandbox\"\n ]\n }\n },\n \"policyRule\": {\n \"if\": {\n \"allOf\": [\n {\n \"field\": \"type\",\n \"equals\": \"Microsoft.Resources/subscriptions\"\n },\n {\n \"field\": \"[[concat('tags[', parameters('MonitorDisableTagName'), ']')]\",\n \"notIn\": \"[[parameters('MonitorDisableTagValues')]\"\n }\n ]\n },\n \"then\": {\n \"effect\": \"deployIfNotExists\",\n \"details\": {\n \"roleDefinitionIds\": [\n \"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\"\n ],\n \"type\": \"Microsoft.AlertsManagement/actionRules\",\n \"existenceScope\": \"resourceGroup\",\n \"resourceGroupName\": \"[[parameters('ALZMonitorResourceGroupName')]\",\n \"deploymentScope\": \"subscription\",\n \"existenceCondition\": {\n \"allOf\": [\n {\n \"field\": \"Microsoft.AlertsManagement/actionRules/description\",\n \"equals\": \"AMBA Notification Assets - Suppression Alert Processing Rule for maintenance period for Subscription\"\n }\n ]\n },\n \"deployment\": {\n \"location\": \"northeurope\",\n \"properties\": {\n \"mode\": \"incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"type\": \"string\"\n },\n \"ALZMonitorResourceGroupTags\": {\n \"type\": \"object\"\n },\n \"ALZMonitorResourceGroupLocation\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.Resources/resourceGroups\",\n \"apiVersion\": \"2021-04-01\",\n \"name\": \"[[parameters('ALZMonitorResourceGroupName')]\",\n \"location\": \"[[parameters('ALZMonitorResourceGroupLocation')]\",\n \"tags\": \"[[parameters('ALZMonitorResourceGroupTags')]\"\n },\n {\n \"type\": \"Microsoft.Resources/deployments\",\n \"apiVersion\": \"2019-10-01\",\n \"name\": \"SuppressionRuleDeployment\",\n \"resourceGroup\": \"[[parameters('ALZMonitorResourceGroupName')]\",\n \"dependsOn\": [\n \"[[concat('Microsoft.Resources/resourceGroups/', parameters('ALZMonitorResourceGroupName'))]\"\n ],\n \"properties\": {\n \"mode\": \"Incremental\",\n \"template\": {\n \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"type\": \"string\"\n }\n },\n \"variables\": {},\n \"resources\": [\n {\n \"type\": \"Microsoft.AlertsManagement/actionRules\",\n \"apiVersion\": \"2021-08-08\",\n \"name\": \"[[concat('apr-AMBA-',subscription().displayName, '-S001')]\",\n \"location\": \"Global\",\n \"dependsOn\": [],\n \"tags\": {\n \"_deployed_by_amba\": true\n },\n \"properties\": {\n \"scopes\": [\n \"[[subscription().Id]\"\n ],\n \"description\": \"AMBA Notification Assets - Suppression Alert Processing Rule for maintenance period for Subscription\",\n \"enabled\": false,\n \"actions\": [\n {\n \"actionType\": \"RemoveAllActionGroups\"\n }\n ]\n }\n }\n ]\n },\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupName')]\"\n }\n }\n }\n }\n ]\n },\n \"parameters\": {\n \"ALZMonitorResourceGroupName\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupName')]\"\n },\n \"ALZMonitorResourceGroupTags\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupTags')]\"\n },\n \"ALZMonitorResourceGroupLocation\": {\n \"value\": \"[[parameters('ALZMonitorResourceGroupLocation')]\"\n }\n }\n }\n }\n }\n }\n }\n }\n}\n", "$fxv#2": { "type": "Microsoft.Authorization/policySetDefinitions", diff --git a/services/AlertsManagement/actionRules/Deploy-AlertProcessingRule-Deploy.json b/services/AlertsManagement/actionRules/Deploy-AlertProcessingRule-Deploy.json index fb8dc2c1..936aee1b 100644 --- a/services/AlertsManagement/actionRules/Deploy-AlertProcessingRule-Deploy.json +++ b/services/AlertsManagement/actionRules/Deploy-AlertProcessingRule-Deploy.json @@ -8,7 +8,7 @@ "displayName": "Deploy AMBA Notification Assets", "description": "Policy to deploy Action Group and Alert Processing Rule for all AMBA alerts", "metadata": { - "version": "1.4.0", + "version": "1.5.0", "category": "Monitoring", "source": "https://github.com/Azure/azure-monitor-baseline-alerts/", "alzCloudEnvironments": [