-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from Brunoga-MS/Dev
AMBA Decoupling Service Health, Alert Rules and Action Groups
- Loading branch information
Showing
19 changed files
with
2,168 additions
and
668 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,9 @@ | |
"enableAMBAServiceHealth": { | ||
"value": "Yes" | ||
}, | ||
"enableAMBANotificationAssets": { | ||
"value": "Yes" | ||
}, | ||
"telemetryOptOut": { | ||
"value": "No" | ||
}, | ||
|
@@ -53,11 +56,42 @@ | |
} | ||
} | ||
}, | ||
"policyAssignmentParametersServiceHealth": { | ||
"policyAssignmentParametersNotificationAssets": { | ||
"value": { | ||
"ALZMonitorActionGroupEmail": { | ||
"value": "[email protected]" | ||
}, | ||
"ALZLogicappResourceId": { | ||
"value": "" | ||
}, | ||
"ALZLogicappCallbackUrl":{ | ||
"value": "" | ||
}, | ||
"ALZArmRoleId": { | ||
"value": "" | ||
}, | ||
"ALZEventHubResourceId": { | ||
"value": "" | ||
}, | ||
"ALZWebhookServiceUri": { | ||
"value": "" | ||
}, | ||
"ALZWebhookObjectId": { | ||
"value": "" | ||
}, | ||
"ALZWebhookIdentifierUri": { | ||
"value": "" | ||
}, | ||
"ALZFunctionResourceId": { | ||
"value": "" | ||
}, | ||
"ALZFunctionTriggerUrl": { | ||
"value": "" | ||
} | ||
} | ||
}, | ||
"policyAssignmentParametersServiceHealth": { | ||
"value": { | ||
"ResHlthUnhealthyAlertState": { | ||
"value": "true" | ||
}, | ||
|
88 changes: 88 additions & 0 deletions
88
patterns/alz/policyAssignments/DINE-NotificationAssetsAssignment.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"topLevelManagementGroupPrefix": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "Provide the ESLZ prefix to your intermediate root management group containing the policy definitions." | ||
} | ||
}, | ||
"enforcementMode": { | ||
"type": "string", | ||
"allowedValues": [ | ||
"Default", | ||
"DoNotEnforce" | ||
], | ||
"defaultValue": "Default" | ||
}, | ||
"nonComplianceMessagePlaceholder": { | ||
"type": "string", | ||
"defaultValue": "{enforcementMode}" | ||
}, | ||
"policyAssignmentParameters": { | ||
"type": "object", | ||
"defaultValue": {} | ||
} | ||
}, | ||
"variables": { | ||
"policyDefinitions": { | ||
"deployAMBANotificationAssets": "[concat('/providers/Microsoft.Management/managementGroups/', parameters('topLevelManagementGroupPrefix'), '/providers/Microsoft.Authorization/policySetDefinitions/Notification-Assets')]" | ||
}, | ||
"policyAssignmentNames": { | ||
"ambaNotificationAssets": "Deploy-AMBA-Notification", | ||
"description": "Initiative to deploy AMBA Notification Assets", | ||
"displayName": "Deploy Azure Monitor Baseline Alerts - Notification Assets" | ||
}, | ||
"nonComplianceMessage": { | ||
"message": "Notification Assets {enforcementMode} be deployed to Azure services.", | ||
"Default": "must", | ||
"DoNotEnforce": "should" | ||
}, | ||
"rbacContributor": "b24988ac-6180-42a0-ab88-20f7382dd24c", | ||
"roleAssignmentNames": { | ||
"deployAMBANotificationAssets": "[guid(concat(parameters('topLevelManagementGroupPrefix'), variables('policyAssignmentNames').ambaNotificationAssets))]" | ||
} | ||
}, | ||
"resources": [ | ||
{ | ||
"type": "Microsoft.Authorization/policyAssignments", | ||
"apiVersion": "2020-09-01", | ||
"name": "[variables('policyAssignmentNames').ambaNotificationAssets]", | ||
"location": "[deployment().location]", | ||
"identity": { | ||
"type": "SystemAssigned" | ||
}, | ||
"properties": { | ||
"description": "[variables('policyAssignmentNames').description]", | ||
"displayName": "[variables('policyAssignmentNames').displayName]", | ||
"policyDefinitionId": "[variables('policyDefinitions').deployAMBANotificationAssets]", | ||
"enforcementMode": "[parameters('enforcementMode')]", | ||
"nonComplianceMessages": [ | ||
{ | ||
"message": "[replace(variables('nonComplianceMessage').message, parameters('nonComplianceMessagePlaceholder'), variables('nonComplianceMessage')[parameters('enforcementMode')])]" | ||
} | ||
], | ||
"parameters": "[parameters('policyAssignmentParameters')]", | ||
"metadata": { | ||
"_deployed_by_amba": true | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "Microsoft.Authorization/roleAssignments", | ||
"apiVersion": "2022-04-01", | ||
"name": "[variables('roleAssignmentNames').deployAMBANotificationAssets]", | ||
"dependsOn": [ | ||
"[variables('policyAssignmentNames').ambaNotificationAssets]" | ||
], | ||
"properties": { | ||
"principalType": "ServicePrincipal", | ||
"roleDefinitionId": "[concat('/providers/Microsoft.Authorization/roleDefinitions/', variables('rbacContributor'))]", | ||
"principalId": "[toLower(reference(concat('/providers/Microsoft.Authorization/policyAssignments/', variables('policyAssignmentNames').ambaNotificationAssets), '2019-09-01', 'Full' ).identity.principalId)]", | ||
"description": "_deployed_by_amba" | ||
} | ||
} | ||
], | ||
"outputs": {} | ||
} |
Oops, something went wrong.