Microsoft.Resources resourceGroups 2019-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@2019-07-01' = {
location: 'string'
managedBy: 'string'
name: 'string'
properties: {}
tags: {
{customized property}: 'string'
}
}
Examples
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'
}
}
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. It must be one of the supported Azure locations. | string (required) |
managedBy | The ID of the resource that manages this resource group. | string |
name | The resource name | string Constraints: Min length = 1 Max length = 1 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 |
---|
Quickstart samples
The following quickstart samples deploy 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": "2019-07-01",
"name": "string",
"location": "string",
"managedBy": "string",
"properties": {
},
"tags": {
"{customized property}": "string"
}
}
Property values
Microsoft.Resources/resourceGroups
Name | Description | Value |
---|---|---|
apiVersion | The api version | '2019-07-01' |
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) |
managedBy | The ID of the resource that manages this resource group. | string |
name | The resource name | string Constraints: Min length = 1 Max length = 1 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 |
---|
Quickstart templates
The following 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@2019-07-01"
name = "string"
location = "string"
managedBy = "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. It must be one of the supported Azure locations. | string (required) |
managedBy | The ID of the resource that manages this resource group. | string |
name | The resource name | string Constraints: Min length = 1 Max length = 1 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@2019-07-01" |
ResourceGroupProperties
Name | Description | Value |
---|
ResourceGroupTags
Name | Description | Value |
---|