Enterprise-Scale
Enterprise-Scale copied to clipboard
Update Deploy-Diagnostics-LogAnalytics with more granular diagnostics settings
Overview/Summary
Update eslzArm/managementGroupTemplates/policyDefinitions/policies.json to include the following: All available parameters for builtin policies for the policy initiative Deploy-Diagnostics-LogAnalytics, Issue described in #860. This is a long-running branch to allow for minor updates to the overall diagnostics logging initiative and custom policies until such a time as all are updated and it is ready to merge into main.
This PR fixes/adds/changes/removes
- New parameters entered between line 13664 and 14028. Values constructed as follows:
- Parameter name constructed from service prefix of policyDefinitionReferenceId - DeployDiagnosticLogDeployLogAnalytics (i.e. StorageAccountDeployDiagnosticLogDeployLogAnalytics becomes StorageAccount for the service name) and actual parameter (e.g. logsEnabled). Following services are involved:
- StorageAccount
- AKS
- Batch
- DataLakeStore
- EventHub
- KeyVault
- LogicAppsWF
- NetworkPublicIPNic
- RecoveryVault
- SearchServices
- ServiceBus
- SQLDatabase
- StreamAnalytics
- Parameter type, metadata and default value pulled from built-in policy definitions and added to parameter set. Meta data display name suffixed with service prefix (StorageDelete - Enabled becomes StorageDelete - Enabled for StorageAccount service).
- References to new parameters added in policy definition references between 14046 and 14978.
Breaking Changes
- Since new parameters are added to policy initiative the initiative will need to be deleted and recreated.
Testing Evidence
Have performed the following basic manual tests:
- Deploy policies.json to management group structure running " New-AzManagementGroupDeployment -Name policies -ManagementGroupId <mgId>-Location westeurope -TemplateFile .\eslzArm\managementGroupTemplates\policyDefinitions\policies.json -topLevelManagementGroupPrefix <mgId>" see screenshot of successful deployment below:

- Assign Deploy-Diagnostics-LogAnalytics to management group structure with default parameters (log analytics environment specific).
- Verify compliance/non-compliance after assigning. See screenshot below:

Further testing to be carried out:
- Verify that deployifnotexists works with new deployments
- Verify various combinations of logging settings
As part of this Pull Request I have
- [x] Checked for duplicate Pull Requests
- [x] Associated it with relevant issues, for tracking and closure.
- [x] Ensured my code/branch is up-to-date with the latest changes in the
mainbranch - [x] Performed testing and provided evidence.
- [ ] Updated relevant and associated documentation. Not relevant yet as this is not going into main
- [ ] Updated the "What's New?" wiki page (located:
/docs/wiki/whats-new.md) Not relevant yet as this is not going into main