Forum Discussion

Ernest_Yu's avatar
Ernest_Yu
Copper Contributor
Aug 18, 2023

A question of AZ-104

I don't quite understand one of the question I found in a test book. 

Regarding the middle question, if the policy prohibits virtual machine, then the VM1 cannot be deallocated. Why is the answer of question 2 "Yes"?

 

 

 

 

 

1 Reply

  • How do you know the answer of question 2 should be "yes"?
    If an Azure Policy with deny effect is added to an existing resource group with existing resources, those resources will become non-compliant but will not change stated, nor will it be deleted. 

    The impact of conflicting Azure Policies

    The state of the VM would remain the same. 

    Not allowed resource types - Microsoft Azure From the policy definition template:

    "description": "The list of resource types that cannot be deployed."

            "allowedValues": [

              "Audit",

              "Deny",

              "Disabled"

     

    No DeployIfNotExist or Modify is present on the template, so it would only affect new resources. 

Resources