Microsoft.Resources resourceGroups 2016-07-01
Bicep resource definition
The resourceGroups resource type can be deployed with operations that target:
- Subscription - See subscription deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Resources/resourceGroups resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Resources/resourceGroups@2016-07-01' = {
location: 'string'
name: 'string'
properties: {}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.Resources/resourceGroups
Name | Description | Value |
---|---|---|
location | The location of the resource group. It cannot be changed after the resource group has been created. Has to be one of the supported Azure Locations, such as West US, East US, West Europe, East Asia, etc. | string (required) |
name | The resource name | string Constraints: Min length = 1 Max length = 90 Pattern = ^[-\w\._\(\)]+$ (required) |
properties | The resource group properties. | ResourceGroupProperties |
tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
ResourceGroupProperties
Name | Description | Value |
---|
ResourceGroupTags
Name | Description | Value |
---|
Usage Examples
Bicep Samples
A basic example of deploying a resource group.
targetScope = 'subscription'
resource rg 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: 'myResourceGroup'
location: deployment().location
tags: {
environment: 'production'
}
}
Azure Verified Modules
The following Azure Verified Modules can be used to deploy this resource type.
Module | Description |
---|---|
Resource Group | AVM Resource Module for Resource Group |
Azure Quickstart Samples
The following Azure Quickstart templates contain Bicep samples for deploying this resource type.
Bicep File | Description |
---|---|
Configure Deployment Environments service | This template provides a way to configure Deployment Environments. |
Create a new Datadog Organization | This template creates a new Datadog - An Azure Native ISV Service resource and a Datadog organization to monitor resources in your subscription. |
Create a resourceGroup | 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 | 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. |
Create a subscription, resourceGroup and storageAccount | This template is a management group template that will create a subscription, a resourceGroup and a storageAccount in the same template. It can be used for an Enterprise Agreement billing mode only. The official documentation shows modifications needed for other types of accounts. |
Create an Azure Virtual Network Manager and sample VNETs | This template deploys an Azure Virtual Network Manager and sample virtual networks into the named resource group. It supports multiple connectivity topologies and network group membership types. |
ARM template resource definition
The resourceGroups resource type can be deployed with operations that target:
- Subscription - See subscription deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Resources/resourceGroups resource, add the following JSON to your template.
{
"type": "Microsoft.Resources/resourceGroups",
"apiVersion": "2016-07-01",
"name": "string",
"location": "string",
"properties": {
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.Resources/resourceGroups
Name | Description | Value |
---|---|---|
apiVersion | The api version | '2016-07-01' |
location | The location of the resource group. It cannot be changed after the resource group has been created. Has to be one of the supported Azure Locations, such as West US, East US, West Europe, East Asia, etc. | string (required) |
name | The resource name | string Constraints: Min length = 1 Max length = 90 Pattern = ^[-\w\._\(\)]+$ (required) |
properties | The resource group properties. | ResourceGroupProperties |
tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
type | The resource type | 'Microsoft.Resources/resourceGroups' |
ResourceGroupProperties
Name | Description | Value |
---|
ResourceGroupTags
Name | Description | Value |
---|
Usage Examples
Azure Quickstart Templates
The following Azure Quickstart templates deploy this resource type.
Template | Description |
---|---|
Configure Deployment Environments service |
This template provides a way to configure Deployment Environments. |
Create a new Datadog Organization |
This template creates a new Datadog - An Azure Native ISV Service resource and a Datadog organization to monitor resources in your subscription. |
Create a resourceGroup |
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 |
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. |
Create a subscription, resourceGroup and storageAccount |
This template is a management group template that will create a subscription, a resourceGroup and a storageAccount in the same template. It can be used for an Enterprise Agreement billing mode only. The official documentation shows modifications needed for other types of accounts. |
Create an Azure Virtual Network Manager and sample VNETs |
This template deploys an Azure Virtual Network Manager and sample virtual networks into the named resource group. It supports multiple connectivity topologies and network group membership types. |
Terraform (AzAPI provider) resource definition
The resourceGroups resource type can be deployed with operations that target:
- Subscription
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Resources/resourceGroups resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Resources/resourceGroups@2016-07-01"
name = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = jsonencode({
properties = {
}
})
}
Property Values
Microsoft.Resources/resourceGroups
Name | Description | Value |
---|---|---|
location | The location of the resource group. It cannot be changed after the resource group has been created. Has to be one of the supported Azure Locations, such as West US, East US, West Europe, East Asia, etc. | string (required) |
name | The resource name | string Constraints: Min length = 1 Max length = 90 Pattern = ^[-\w\._\(\)]+$ (required) |
properties | The resource group properties. | ResourceGroupProperties |
tags | Resource tags | Dictionary of tag names and values. |
type | The resource type | "Microsoft.Resources/resourceGroups@2016-07-01" |
ResourceGroupProperties
Name | Description | Value |
---|
ResourceGroupTags
Name | Description | Value |
---|
Usage Examples
Azure Verified Modules
The following Azure Verified Modules can be used to deploy this resource type.
Module | Description |
---|---|
Resource Group | AVM Resource Module for Resource Group |