az-900 Practice Question 527
Exam: az-900
Domain: Describe cloud concepts
Topic: Describe cloud computing
Difficulty: medium
You have a resource group named RG1.
You need to prevent the creation of virtual machines in RG1. The solution must ensure that other objects can be created in RG1.
What should you use?
A. a lock
B. an Azure role
C. a tag
D. an Azure policy
Answer Options
A
a lock
B
an Azure role
C
a tag
D
an Azure policy
Correct Answer
D: an Azure policy
Explanation
Azure policies can be used to define requirements for resource properties during deployment and for already existing resources. Azure Policy
controls properties such as the types or locations of resources.
Azure Policy is a service in Azure that you use to create, assign, and manage policies. These policies enforce different rules and effects over
your resources, so those resources stay compliant with your corporate standards and service level agreements.
In this question, we would create an Azure policy assigned to the resource group that denies the creation of virtual machines in the resource
group.
You could place a read-only lock on the resource group. However, that would prevent the creation of any resources in the resource group, not
virtual machines only. Therefore, an Azure Policy is a better solution.