Show user friendly message when Azure Policy does not meet compliance

Copper Contributor

We have created custom policy which checking tags existence when a user creates a new resource group. The policy works great.

But we have faced unexpected behavior. When we tried to create a new resource group for test purposes (without tags) we had an uninformative error (Unexpected error while creating the resource group.). 
We think some people might have a misunderstanding about this message (From this message they won’t understand why they cannot create a new resource group). 
We investigated this issue but have not found trouble in the policy itself therefore right now we think it is an azure policy issue.

 

Does somebody meet this kind of issue? Is there a workaround for the issue?

 

The original feedback: https://feedback.azure.com/forums/915958-azure-governance/suggestions/36599173-show-user-friendly-me...

 

1 Reply

@Evgeniy_BytsenkoHi, would you mind sharing your policy? I was about to embark on the journey of locking down cloud spend, and stumbled on this post.

For my part, I have written a small powershell function that deletes all resource groups which have not been tagged. But I'd like to throw a warning when an RG is not created 'correctly'.

 

 

Happy to share the code.