Solas Energy Systems is designing a governance and compliance strategy for its Azure environment. The resource hierarchy consists of a root management group named Solas-Root, with a child management group named Solas-Prod. Under Solas-Prod, there are multiple subscriptions, including 'Solas-Prod-Sub-02'. You must design an Azure Policy solution that meets the following compliance requirements:
1. All storage accounts deployed under Solas-Prod must use HTTPS only. If a storage account is deployed without HTTPS enabled, Azure Policy must automatically enable it during resource creation.
2. Virtual machines in all subscriptions under Solas-Prod must not be deployed with public IP addresses.
3. Virtual machines in a resource group named 'Legacy-App-RG' under 'Solas-Prod-Sub-02' must be allowed to have public IP addresses to support a legacy telemetry service. However, storage accounts in 'Legacy-App-RG' must still be forced to use HTTPS.
4. The solution must minimize administrative overhead for policy assignment and compliance reporting.
Which design should you recommend?
- Create a policy initiative containing a policy definition with the Modify effect for storage accounts and a policy definition with the Deny effect for virtual machine public IPs. Assign the initiative to the Solas-Prod management group. Create a policy exemption targeting the Legacy-App-RG resource group scope for the virtual machine public IP policy definition within the initiative assignment.Cevap
- BCreate a policy initiative containing a policy definition with the Modify effect for storage accounts and a policy definition with the Deny effect for virtual machine public IPs. Assign the initiative to the Solas-Prod management group with the Legacy-App-RG resource group added to the notScopes property of the assignment.
- CCreate a policy initiative containing a policy definition with the DeployIfNotExists effect for storage accounts and a policy definition with the Deny effect for virtual machine public IPs. Assign the initiative to the Solas-Prod management group. Create a policy exemption targeting the Legacy-App-RG resource group scope for the virtual machine public IP policy definition within the initiative assignment.
- DCreate two separate policy assignments at the Solas-Prod management group scope: one for a policy definition with the Deny effect for storage accounts, and one for a policy definition with the Deny effect for virtual machine public IPs. Configure the notScopes property on both assignments to exclude the Legacy-App-RG resource group.