A financial services company is designing the governance strategy for its Azure landing zone. The management group hierarchy has a root management group named Enterprise-MG, with two child management groups: Production-MG and Sandbox-MG. You need to implement a policy governance strategy that satisfies the following requirements:
1. All Azure Key Vaults deployed within Production-MG must automatically have diagnostic logging configured to send logs to a central Log Analytics workspace upon resource creation.
2. No virtual machines within Enterprise-MG are allowed to have public IP addresses, and any deployment attempt that includes a public IP must be blocked. However, this restriction must not apply to resources within a specific subscription under Sandbox-MG named Dev-Sandbox-Sub.
Which policy configuration should you design to meet these requirements with the minimum administrative overhead?
- AAssign a Deny policy for Key Vault diagnostics to Production-MG, and assign a Deny policy for public IPs to Enterprise-MG with the subscription ID of Dev-Sandbox-Sub added to the notScopes property of the assignment.
- BAssign a DeployIfNotExists policy for Key Vault diagnostics to Production-MG, and assign a DeployIfNotExists policy for public IPs to Enterprise-MG to automatically strip public IP addresses, without configuring any exclusions.
- Assign a DeployIfNotExists policy for Key Vault diagnostics to Production-MG, and assign a Deny policy for public IPs to Enterprise-MG with the subscription ID of Dev-Sandbox-Sub added to the notScopes property of the assignment.Answer
- DAssign a Deny policy for Key Vault diagnostics to Production-MG, and assign a DeployIfNotExists policy for public IPs to Enterprise-MG with the subscription ID of Dev-Sandbox-Sub added to the notScopes property of the assignment.