Microsoft.Resources tags
The tags resource type is an extension resource, which means you can apply it to another resource.
Use the scope property on this resource to set the scope for this resource.
- For Bicep, see Set scope on extension resources in Bicep.
- For JSON, see Set scope on extension resources in ARM templates.
Valid deployment scopes for the tags resource are:
- Management Group
- Subscription
- Resource Group
Remarks
To learn about applying tags through ARM templates or Bicep files, see Use tags to organize your Azure resources and management hierarchy.
Template format
To create a Microsoft.Resources/tags resource, add the following Bicep or JSON to your template.
resource symbolicname 'Microsoft.Resources/tags@2021-04-01' = {
name: 'default'
scope: resourceSymbolicName
properties: {
tags: {
tagName1: 'tagValue1'
tagName2: 'tagValue2'
}
}
}
Property values
tags
Name | Description | Value |
---|---|---|
type | The resource type For Bicep, set this value in the resource declaration. |
'Microsoft.Resources/tags' |
apiVersion | The resource api version For Bicep, set this value in the resource declaration. |
'2021-04-01' |
name | The resource name | 'default' |
scope | Use when creating an extension resource at a scope that is different than the deployment scope. | Target resource For Bicep, set this property to the symbolic name of the resource to apply the extension resource. For JSON, set the value to the full name of the resource to apply the extension resource to. |
properties | A dictionary of name and value pairs. | Tags (required) |
Tags
Name | Description | Value |
---|---|---|
tags | Dictionary of {string} | object |