Search code examples
azureazure-policy

Can we have multiple effect in Azure Policy


I have created a policy which will enable Azure Hybrid Benefit for Windows Servers, Client & SQL. We have multiple subscriptions created based on prod and sandbox. What i'm looking for is, If the subscription is belongs to prod then it should do audit and for others it should do Append. So i think it should have kind of if else condition or where condition, but as i checked i don't see any reference article or any possibble solutions to achieve the same. Can someone guide me how to acheive the same. Thanks in advance!

Regards, Logan


Solution

  • I would consider setting up an Azure Management Group hierarchy with the first level below the Root MG broken out into Prod and Sandbox. From there, you can scope different Azure Policies (one for Audit, the other for Append) depending on the Management Group the subscription falls under.

    enter image description here