An enterprise manages its Azure resources using a Management Group hierarchy consisting of a Root Management Group, under which sit a Production Management Group (containing production subscriptions) and a Non-Production Management Group (containing Dev and Test subscriptions).
You need to design a governance strategy using Azure Policy to meet the following requirements:
1. All virtual networks deployed within the Production Management Group must have Azure Network Watcher flow logs enabled and configured to send data to a central Log Analytics workspace. Non-compliant virtual networks must be automatically remediated during deployment without blocking the resource creation.
2. Virtual machines of the G-series must be blocked from deployment within the Test subscription to control costs. However, developers must be allowed to deploy these virtual machines within a specific resource group named PerfTesting-RG inside the Test subscription.
3. Administrative overhead for managing policy assignments and compliance must be minimized.
Which policy design should you recommend?
- Assign a policy definition using the DeployIfNotExists effect to the Production Management Group to configure Network Watcher flow logs. Assign a policy definition using the Deny effect to the Test subscription to restrict G-series virtual machines, and add the PerfTesting-RG resource group to the exclusion scope (notScopes) of this assignment.Cevap
- BAssign a policy definition using the Deny effect to the Production Management Group to block virtual networks without flow logs. Assign a policy definition using the DeployIfNotExists effect to the Test subscription to remediate virtual machines that are not of the G-series, using Policy Exemptions for the PerfTesting-RG resource group.
- CAssign a policy definition using the Audit effect to the Production Management Group for flow logs, and configure an Azure Automation runbook to enable flow logs. Assign a policy definition using the Deny effect to the Test subscription for G-series virtual machines, and create a policy exemption for the PerfTesting-RG resource group.
- DCreate a policy initiative containing both policy definitions. Assign the initiative at the Root Management Group, and configure policy exemptions for the entire Non-Production Management Group for the flow logs policy, and another policy exemption for the PerfTesting-RG resource group for the virtual machine size policy.