A retail company's cloud architecture includes a parent Management Group named Enterprise-MG that contains three subscriptions: Prod-Sub-01, Prod-Sub-02, and Dev-Sub-01. The governance team establishes the following design requirements:
- All virtual machines deployed in any subscription must use managed disks. Any attempt to deploy a virtual machine with unmanaged disks must be blocked.
- The development resource group Sandbox-RG, located in Dev-Sub-01, must be allowed to deploy virtual machines with unmanaged disks.
- All storage accounts deployed in any subscription must have diagnostic settings configured to send logs to a central Log Analytics workspace. If a storage account is deployed without diagnostic settings, the settings must be created automatically.
You need to design an Azure Policy solution that meets these requirements with the minimum administrative overhead.
Which two policy configurations should you include in the design?
- Assign a policy definition that uses the Deny effect to enforce managed disks at the Enterprise-MG level, and add the Sandbox-RG scope to the assignment's exclusion list (notScopes).Answer
- Assign a policy definition that uses the DeployIfNotExists effect to configure storage account diagnostics at the Enterprise-MG level, and configure a managed identity for remediation.Answer
- CAssign a policy definition that uses the Deny effect to block the creation of storage accounts without diagnostics at the Enterprise-MG level, and run a manual remediation task weekly.
- DAssign a policy definition that uses the Audit effect to flag virtual machines with unmanaged disks at the Enterprise-MG level, and write a custom automation runbook to delete non-compliant VMs.
- EAssign a policy definition that uses the Modify effect to convert unmanaged disks to managed disks during virtual machine deployment at the Enterprise-MG level.