PhilippGerber-6516 avatar image
0 Votes"
PhilippGerber-6516 asked SwathiDhanwada-MSFT commented

Azure Policy - Compare the Resourcegroup tag with the Ressources inside

Hello Community,

i need a Azure Policy to compare all Resource Groups Tags with the Inside Resources.

For Example:

The RessourceGroup have the Tag "Demo:Project"
The Ressources inside this Ressource Group have the "Demo:Stage" Tag.

Now I want to find all mismatched resources by tag.

So all those who have the tag name, but a different value.
in addition, however, only the resources that match the tag name should be displayed.

So the Ressource with an Tag "Hello:Welt" should not be considered.


RG = Demo:Project
Ressource1 = Demo:Project
Ressource2 = Demo: Project
Ressource 3= Demo:123
Ressource 4 = Hallo:Welt

Now i would like the follow result:
The Policy should show me only the Ressource 3 because the TagValue is different as the Tag Value from the RessourecGroup but the TagName is the same.

Thanks a lot.

'Best Regards,

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@PhilippGerber-6516 Thanks for your query. I am looking into it and will update you in a while.

0 Votes 0 ·

0 Answers