Your company is designing a governance strategy for Azure resources. You need to implement Azure Policies that satisfy the following requirements:
- Prevent the deployment of virtual machines that do not use approved VM sizes.
- Automatically add a default department tag to resource groups when they are created without one.
Which two Azure Policy effects should you select to meet these requirements?
- DenyCevap
- ModifyCevap
- CAudit
- DDeployIfNotExists
Cevap
The correct effects to use are Deny to block non-compliant virtual machine deployments and Modify to automatically add missing tags to resource groups.
The correct strategy combines the Deny effect to block the creation of non-compliant resources (unapproved VM sizes) and the Modify effect to dynamically add missing tags during deployment.
Adım Adım Çözüm
Anahtar Kavram
Selecting appropriate Azure Policy effects to enforce compliance by blocking or automatically modifying resources during deployment.