Microsoft Azure Fundamentals — Question 391

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?

Answer options

Correct answer: D

Explanation

Using an Azure policy allows you to specify and enforce rules for resources within a resource group, such as preventing the creation of virtual machines while permitting other resource types. A lock would prevent all changes to resources, an Azure role defines permissions but does not restrict resource types, and a tag is used for organization and billing but does not enforce creation rules.