Microsoft.Resources resourceGroups

The resourceGroups resource type can be deployed to: Subscriptions.

To learn about subscription deployments, see Bicep or ARM template

Template format

To create a Microsoft.Resources/resourceGroups resource, add the following Bicep or JSON to your template.

resource symbolicname 'Microsoft.Resources/resourceGroups@2021-04-01' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  managedBy: 'string'
  properties: {}
}

Property values

resourceGroups

Name Description Value
type The resource type

For Bicep, set this value in the resource declaration.
'Microsoft.Resources/resourceGroups'
apiVersion The resource api version

For Bicep, set this value in the resource declaration.
'2021-04-01'
name The resource name string (required)
location The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations. string (required)
tags The tags attached to the resource group. Dictionary of tag names and values. See Tags in templates
managedBy The ID of the resource that manages this resource group. string
properties The resource group properties. ResourceGroupProperties

ResourceGroupProperties

This object doesn't contain any properties to set during deployment. All properties are ReadOnly.

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Create a resourceGroup

Deploy to Azure
This template is a subscription level template that will create a resourceGroup. Currently, this template can be deployed via the Azure Portal.
Create a resourceGroup, apply a lock and RBAC

Deploy to Azure
This template is a subscription level template that will create a resourceGroup, apply a lock the the resourceGroup and assign contributor permssions to the supplied principalId. Currently, this template cannot be deployed via the Azure Portal.