You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As your organization matures, you can deploy an Azure Resource Manager template (ARM template) to create resources at the managementgroup level. For example, you may need to define and assign [policies](../../governance/policy/overview.md) or [Azure role-based access control (Azure RBAC)](../../role-based-access-control/overview.md) for a management group. With managementgrouplevel templates, you can declaratively apply policies and assign roles at the managementgroup level.
11
+
As your organization matures, you can deploy an Azure Resource Manager template (ARM template) to create resources at the management-group level. For example, you might need to define and assign [policies](../../governance/policy/overview.md) or [Azure role-based access control (Azure RBAC)](../../role-based-access-control/overview.md) for a management group. With management-group-level templates, you can declaratively apply policies and assign roles at the management-group level.
12
12
13
13
> [!TIP]
14
-
> We recommend [Bicep](../bicep/overview.md)because it offers the same capabilities as ARM templates and the syntax is easier to use. To learn more, see [managementgroup deployments](../bicep/deploy-to-management-group.md).
14
+
> [Bicep](../bicep/overview.md)is recommended since it offers the same capabilities as ARM templates, and the syntax is easier to use. To learn more, see [management-group deployments](../bicep/deploy-to-management-group.md).
15
15
16
16
## Supported resources
17
17
18
-
Not all resource types can be deployed to the managementgroup level. This section lists which resource types are supported.
18
+
Not all resource types can be deployed to the management-group level. This section lists which resource types are supported.
19
19
20
20
For Azure Blueprints, use:
21
21
@@ -49,11 +49,11 @@ For managing your resources, use:
Management groups are tenant-level resources. However, you can create management groups in a managementgroup deployment by setting the scope of the new management group to the tenant. See [Management group](#management-group).
52
+
Management groups are tenant-level resources. However, you can create management groups in a management-group deployment by setting the scope of the new management group to the tenant. See [Management group](#management-group).
53
53
54
54
## Schema
55
55
56
-
The schema you use for managementgroup deployments is different than the schema for resource group deployments.
56
+
The schema you use for management-group deployments is different than the schema for resource group deployments.
57
57
58
58
For templates, use:
59
59
@@ -75,7 +75,7 @@ The schema for a parameter file is the same for all deployment scopes. For param
75
75
76
76
## Deployment commands
77
77
78
-
To deploy to a management group, use the managementgroup deployment commands.
78
+
To deploy to a management group, use the management-group deployment commands.
79
79
80
80
# [Azure CLI](#tab/azure-cli)
81
81
@@ -114,11 +114,11 @@ For more detailed information about deployment commands and options for deployin
114
114
115
115
## Deployment location and name
116
116
117
-
For managementgrouplevel deployments, you must provide a location for the deployment. The location of the deployment is separate from the location of the resources you deploy. The deployment location specifies where to store deployment data. [Subscription](deploy-to-subscription.md) and [tenant](deploy-to-tenant.md) deployments also require a location. For [resource group](deploy-to-resource-group.md) deployments, the location of the resource group is used to store the deployment data.
117
+
For management-group-level deployments, you must provide a location for the deployment. The location of the deployment is separate from the location of the resources you deploy. The deployment location specifies where to store deployment data. [Subscription](deploy-to-subscription.md) and [tenant](deploy-to-tenant.md) deployments also require a location. For [resource group](deploy-to-resource-group.md) deployments, the location of the resource group is used to store the deployment data.
118
118
119
119
You can provide a name for the deployment, or use the default deployment name. The default name is the name of the template file. For example, deploying a template named _azuredeploy.json_ creates a default deployment name of **azuredeploy**.
120
120
121
-
For each deployment name, the location is immutable. You can't create a deployment in one location when there's an existing deployment with the same name in a different location. For example, if you create a managementgroup deployment with the name **deployment1** in **centralus**, you can't later create another deployment with the name **deployment1** but a location of **westus**. If you get the error code `InvalidDeploymentLocation`, either use a different name or the same location as the previous deployment for that name.
121
+
For each deployment name, the location is immutable. You can't create a deployment in one location when there's an existing deployment with the same name in a different location. For example, if you create a management-group deployment with the name **deployment1** in **centralus**, you can't later create another deployment with the name **deployment1** but a location of **westus**. If you get the error code `InvalidDeploymentLocation`, use a different name or the same location as the previous deployment for that name.
122
122
123
123
## Deployment scopes
124
124
@@ -132,59 +132,197 @@ When deploying to a management group, you can deploy resources to:
To target another management group, add a nested deployment and specify the `scope` property. Set the `scope` property to a value in the format `Microsoft.Management/managementGroups/<mg-name>`.
158
+
To target another management group, add a nested deployment and specify the `scope` property. Set the `scope` property to a value in the `Microsoft.Management/managementGroups/<mg-name>` format.
You can also target resource groups within the management group. The user deploying the template must have access to the specified scope.
164
228
165
-
To target a resource group within the management group, use a nested deployment. Set the `subscriptionId` and `resourceGroup` properties. Don't set a location for the nested deployment because it's deployed in the location of the resource group.
229
+
To target a resource group within the management group, use a nested deployment. Set the `subscriptionId` and `resourceGroup` properties. Don't set a location for the nested deployment because it's deployed in the location of the resource group:
To use a managementgroup deployment for creating a resource group within a subscription and deploying a storage account to that resource group, see [Deploy to subscription and resource group](#deploy-to-subscription-and-resource-group).
259
+
To use a management-group deployment for creating a resource group within a subscription and deploying a storage account to that resource group, see [Deploy to subscription and resource group](#deploy-to-subscription-and-resource-group).
170
260
171
261
### Scope to tenant
172
262
173
263
To create resources at the tenant, set the `scope` to `/`. The user deploying the template must have the [required access to deploy at the tenant](deploy-to-tenant.md#required-access).
174
264
175
-
To use a nested deployment, set `scope` and `location`.
265
+
To use a nested deployment, set `scope` and `location`:
The next example creates a new management group in the management group specified as the parent. Notice that the scope is set to `/`.
190
328
@@ -238,9 +376,9 @@ To deploy a template that moves an existing Azure subscription to a new manageme
238
376
239
377
## Azure Policy
240
378
241
-
Custom policy definitions that are deployed to the management group are extensions of the management group. To get the ID of a custom policy definition, use the [extensionResourceId()](template-functions-resource.md#extensionresourceid) function. Built-in policy definitions are tenantlevel resources. To get the ID of a built-in policy definition, use the [tenantResourceId()](template-functions-resource.md#tenantresourceid) function.
379
+
Custom policy definitions that are deployed to the management group are extensions of the management group. To get the ID of a custom policy definition, use the [`extensionResourceId()`](template-functions-resource.md#extensionresourceid) function. Built-in policy definitions are tenant-level resources. To get the ID of a built-in policy definition, use the [`tenantResourceId()`](template-functions-resource.md#tenantresourceid) function.
242
380
243
-
The following example shows how to [define](../../governance/policy/concepts/definition-structure.md) a policy at the managementgroup level, and assign it.
381
+
The following example shows how to [define](../../governance/policy/concepts/definition-structure.md) a policy at the management-group level and assign it:
244
382
245
383
```json
246
384
{
@@ -310,7 +448,7 @@ The following example shows how to [define](../../governance/policy/concepts/def
310
448
311
449
## Deploy to subscription and resource group
312
450
313
-
From a managementgrouplevel deployment, you can target a subscription within the management group. The following example creates a resource group within a subscription and deploys a storage account to that resource group.
451
+
From a management-group-level deployment, you can target a subscription within the management group. The following example creates a resource group within a subscription and deploys a storage account to that resource group:
314
452
315
453
```json
316
454
{
@@ -393,5 +531,5 @@ From a management group level deployment, you can target a subscription within t
393
531
## Next steps
394
532
395
533
* To learn about assigning roles, see [Assign Azure roles using Azure Resource Manager templates](../../role-based-access-control/role-assignments-template.md).
396
-
* For an example of deploying workspace settings for Microsoft Defender for Cloud, see [deployASCwithWorkspaceSettings.json](https://github.com/krnese/AzureDeploy/blob/master/ARM/deployments/deployASCwithWorkspaceSettings.json).
397
-
* You can also deploy templates at [subscription level](deploy-to-subscription.md) and [tenant level](deploy-to-tenant.md).
534
+
* For an example of deploying workspace settings for Microsoft Defender for Cloud, see [_deployASCwithWorkspaceSettings.json_](https://github.com/krnese/AzureDeploy/blob/master/ARM/deployments/deployASCwithWorkspaceSettings.json).
535
+
* You can also deploy templates at the [subscription level](deploy-to-subscription.md) and [tenant level](deploy-to-tenant.md).
0 commit comments