Skip to content

Commit 82908a6

Browse files
authored
Merge pull request #106169 from tfitzmac/0302scopes
update scoped deployments
2 parents b055f8a + 3b5ee41 commit 82908a6

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

articles/azure-resource-manager/templates/deploy-to-management-group.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22
title: Deploy resources to management group
33
description: Describes how to deploy resources at the management group scope in an Azure Resource Manager template.
44
ms.topic: conceptual
5-
ms.date: 02/10/2020
5+
ms.date: 03/02/2020
66
---
77

88
# Create resources at the management group level
99

1010
Typically, you deploy Azure resources to a resource group in your Azure subscription. However, you can also create resources at the management group level. You use management group level deployments to take actions that make sense at that level, such as assigning [role-based access control](../../role-based-access-control/overview.md) or applying [policies](../../governance/policy/overview.md).
1111

12-
Currently, to deploy templates at the management group level, you must use the REST API.
13-
1412
## Supported resources
1513

1614
You can deploy the following resource types at the management group level:
@@ -40,7 +38,16 @@ https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeployment
4038

4139
## Deployment commands
4240

43-
The command for management group deployments is different than the command for resource group deployments.
41+
The commands for management group deployments are different than the commands for resource group deployments.
42+
43+
For Azure PowerShell, use [New-AzManagementGroupDeployment](/powershell/module/az.resources/new-azmanagementgroupdeployment).
44+
45+
```azurepowershell-interactive
46+
New-AzManagementGroupDeployment `
47+
-ManagementGroupId "myMG" `
48+
-Location "West US" `
49+
-TemplateUri https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/management-level-deployment/azuredeploy.json
50+
```
4451

4552
For REST API, use [Deployments - Create At Management Group Scope](/rest/api/resources/deployments/createorupdateatmanagementgroupscope).
4653

@@ -145,7 +152,7 @@ The following example assigns an existing policy definition to the management gr
145152

146153
## Template sample
147154

148-
* Create a resource group, a policy and a policy assignment. See [here](https://github.com/Azure/azure-docs-json-samples/blob/master/management-level-deployment/azuredeploy.json).
155+
* [Create a resource group, a policy and a policy assignment](https://github.com/Azure/azure-docs-json-samples/blob/master/management-level-deployment/azuredeploy.json).
149156

150157
## Next steps
151158

articles/azure-resource-manager/templates/deploy-to-subscription.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Deploy resources to subscription
33
description: Describes how to create a resource group in an Azure Resource Manager template. It also shows how to deploy resources at the Azure subscription scope.
44
ms.topic: conceptual
5-
ms.date: 02/10/2020
5+
ms.date: 03/02/2020
66
---
77

88
# Create resource groups and resources at the subscription level
@@ -15,6 +15,7 @@ To deploy templates at the subscription level, use Azure CLI, PowerShell, or RES
1515

1616
You can deploy the following resource types at the subscription level:
1717

18+
* [budgets](/azure/templates/microsoft.consumption/budgets)
1819
* [deployments](/azure/templates/microsoft.resources/deployments)
1920
* [peerAsns](/azure/templates/microsoft.peering/peerasns)
2021
* [policyAssignments](/azure/templates/microsoft.authorization/policyassignments)
@@ -55,10 +56,10 @@ az deployment create \
5556
```
5657

5758

58-
For the PowerShell deployment command, use [New-AzDeployment](/powershell/module/az.resources/new-azdeployment). The following example deploys a template to create a resource group:
59+
For the PowerShell deployment command, use [New-AzDeployment](/powershell/module/az.resources/new-azdeployment) or **New-AzSubscriptionDeployment**. The following example deploys a template to create a resource group:
5960

6061
```azurepowershell-interactive
61-
New-AzDeployment `
62+
New-AzSubscriptionDeployment `
6263
-Name demoDeployment `
6364
-Location centralus `
6465
-TemplateUri https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/emptyRG.json `
@@ -295,7 +296,7 @@ $definition = Get-AzPolicyDefinition | Where-Object { $_.Properties.DisplayName
295296
$locations = @("westus", "westus2")
296297
$policyParams =@{listOfAllowedLocations = @{ value = $locations}}
297298
298-
New-AzDeployment `
299+
New-AzSubscriptionDeployment `
299300
-Name policyassign `
300301
-Location centralus `
301302
-TemplateUri https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/policyassign.json `
@@ -361,16 +362,16 @@ az deployment create \
361362
To deploy this template with PowerShell, use:
362363

363364
```azurepowershell
364-
New-AzDeployment `
365+
New-AzSubscriptionDeployment `
365366
-Name definePolicy `
366367
-Location centralus `
367368
-TemplateUri https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/policydefineandassign.json
368369
```
369370

370371
## Template samples
371372

372-
* Create a resource group, lock it and give permissions to it. See [here](https://github.com/Azure/azure-quickstart-templates/tree/master/subscription-level-deployments/create-rg-lock-role-assignment).
373-
* Create a resource group, a policy and a policy assignment. See [here](https://github.com/Azure/azure-docs-json-samples/blob/master/subscription-level-deployment/azuredeploy.json).
373+
* [Create a resource group, lock it and give permissions to it](https://github.com/Azure/azure-quickstart-templates/tree/master/subscription-level-deployments/create-rg-lock-role-assignment).
374+
* [Create a resource group, a policy, and a policy assignment](https://github.com/Azure/azure-docs-json-samples/blob/master/subscription-level-deployment/azuredeploy.json).
374375

375376
## Next steps
376377

0 commit comments

Comments
 (0)