Azure Built in Tagging Policy Resource Group to Inherit Subscription tags

Ensure your Azure Resource groups are tagged with the Tag from Subscription

In this example we have the following requirements

  • The costCentre tag has been manually added to the Subscription
  • The Resource Group inherits from the container they are in, but can be manually overridden

Costcentre Tag Configuration

  • Modify Resource Group to add the Costcentre tag from the parent Subscription

Go to Policy

And Click on Definitions

Search for Inherit a tag from the Subscription

Currently this only works for Resources. In order to set it to work for Subscriptions it needs updating.

click on the Subscription and then Duplicate definition

The Definition location has been set to a subscription but you can also set it to a Management Group

{  “mode”: “Indexed”,

In the Script, the mode is set to Indexed. this needs changing to All

{  “mode”: “All”,

And Save the new custom Policy

Once you have a New customer definition, we can assign it. Go back to the top of Policy and and click on Assignments

Time to assign a new Policy

No Need to select a Resource group because they haven’t been created yet and this applies to all resource groups that have yet to be created

Choose Inherit a tag from the subscription if missing (Resource Group) which is the new custom policy

The Assignment Name has been changed to include the tag

And the tag name is added as a parameter. Ensure that the Tag matches the tag in the subscription

We need a Managed Identity because this has a modify effect

Then go to Review + Create and Create

Test the New Modify Policy

This is the tag on the Subscription

Create a New Resource Group (And remember to apply any tags of Policies you have already set

And there is the CostCentre which has been inherited from the Subscription

One Reply to “Azure Built in Tagging Policy Resource Group to Inherit Subscription tags”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s