A company named Solis Energy is designing a governance strategy for its Azure subscriptions. The subscriptions are organized under a parent management group named Solis-Production.
The company has the following requirements:
1. All newly deployed virtual machines must have the Azure Monitor Dependency Agent installed automatically.
2. Virtual machines deployed in a specific subscription named Solis-DevTest, which is nested under Solis-Production, must not have the agent installed to minimize costs.
3. The solution must minimize administrative overhead.
Which Azure Policy design should you recommend?
- Assign an Azure Policy containing a DeployIfNotExists effect at the Solis-Production management group scope, and configure the Solis-DevTest subscription in the notScopes property of the assignment.Cevap
- BAssign an Azure Policy containing a Deny effect at the Solis-Production management group scope, and configure the Solis-DevTest subscription in the notScopes property of the assignment, then manually install the agent.
- CAssign an Azure Policy containing a Modify effect at the Solis-Production management group scope, and assign a separate policy with the Audit effect to the Solis-DevTest subscription to overwrite the parent setting.
- DAssign an Azure Policy containing an Audit effect at the Solis-Production management group scope, and manually deploy the agent to non-compliant virtual machines using an Azure Automation runbook.
Cevap
Assign an Azure Policy containing a DeployIfNotExists effect at the Solis-Production management group scope, and configure the Solis-DevTest subscription in the notScopes property of the assignment.
The DeployIfNotExists effect is designed to deploy a template (such as a VM extension) if it does not exist when a resource is created or updated. Assigning the policy at the management group level ensures inheritance across all nested subscriptions. Using the notScopes property in the assignment is the standard method to exclude specific scopes (like the Solis-DevTest subscription) from the policy's effect without needing to manage multiple separate assignments, thereby minimizing administrative overhead.
Adım Adım Çözüm
Anahtar Kavram
Azure Policy effects and assignment scope exclusions