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
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/templates/deploy-cli.md
+23-7Lines changed: 23 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Deploy resources with Azure CLI and template
3
3
description: Use Azure Resource Manager and Azure CLI to deploy resources to Azure. The resources are defined in a Resource Manager template.
4
4
ms.topic: conceptual
5
-
ms.date: 10/09/2019
5
+
ms.date: 03/16/2020
6
6
---
7
7
# Deploy resources with Resource Manager templates and Azure CLI
8
8
@@ -14,23 +14,39 @@ If you don't have Azure CLI installed, you can use the [Cloud Shell](#deploy-tem
14
14
15
15
## Deployment scope
16
16
17
-
You can target your deployment to either an Azure subscription or a resource group within a subscription. In most cases, you'll target deployment to a resource group. Use subscription deployments to apply policies and role assignments across the subscription. You also use subscriptiondeploymentsto create a resource group and deploy resources to it. Depending on the scope of the deployment, you use different commands.
17
+
You can target your deployment to a resource group, subscription, management group, or tenant. In most cases, you'll target deployment to a resource group. To apply policies and role assignments across a larger scope, use subscription, management group, or tenant deployments. When deploying to a subscription, you can create a resource group and deploy resources to it.
18
18
19
-
To deploy to a **resource group**, use [az group deployment create](/cli/azure/group/deployment?view=azure-cli-latest#az-group-deployment-create):
19
+
Depending on the scope of the deployment, you use different commands.
20
+
21
+
To deploy to a **resource group**, use [az deployment group create](/cli/azure/deployment/group?view=azure-cli-latest#az-deployment-group-create):
20
22
21
23
```azurecli-interactive
22
-
az group deployment create --resource-group <resource-group-name> --template-file <path-to-template>
24
+
az deployment group create --resource-group <resource-group-name> --template-file <path-to-template>
23
25
```
24
26
25
-
To deploy to a **subscription**, use [az deployment create](/cli/azure/deployment?view=azure-cli-latest#az-deployment-create):
27
+
To deploy to a **subscription**, use [az deployment sub create](/cli/azure/deployment/sub?view=azure-cli-latest#az-deployment-sub-create):
26
28
27
29
```azurecli-interactive
28
-
az deployment create --location <location> --template-file <path-to-template>
30
+
az deployment sub create --location <location> --template-file <path-to-template>
29
31
```
30
32
31
33
For more information about subscription level deployments, see [Create resource groups and resources at the subscription level](deploy-to-subscription.md).
32
34
33
-
Currently, management group deployments are only supported through the REST API. For more information about management group level deployments, see [Create resources at the management group level](deploy-to-management-group.md).
35
+
To deploy to a **management group**, use [az deployment mg create](/cli/azure/deployment/mg?view=azure-cli-latest#az-deployment-mg-create):
36
+
37
+
```azurecli-interactive
38
+
az deployment mg create --location <location> --template-file <path-to-template>
39
+
```
40
+
41
+
For more information about management group level deployments, see [Create resources at the management group level](deploy-to-management-group.md).
42
+
43
+
To deploy to a **tenant**, use [az deployment tenant create](/cli/azure/deployment/tenant?view=azure-cli-latest#az-deployment-tenant-create):
44
+
45
+
```azurecli-interactive
46
+
az deployment tenant create --location <location> --template-file <path-to-template>
47
+
```
48
+
49
+
For more information about tenant level deployments, see [Create resources at the tenant level](deploy-to-tenant.md).
34
50
35
51
The examples in this article use resource group deployments.
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/templates/deploy-to-subscription.md
+13-14Lines changed: 13 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Deploy resources to subscription
3
3
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.
4
4
ms.topic: conceptual
5
-
ms.date: 03/09/2020
5
+
ms.date: 03/16/2020
6
6
---
7
7
8
8
# Create resource groups and resources at the subscription level
The commands for subscription-level deployments are different than the commands for resource group deployments.
47
47
48
-
For the Azure CLI, use [az deployment create](/cli/azure/deployment?view=azure-cli-latest#az-deployment-create). The following example deploys a template to create a resource group:
48
+
For Azure CLI, use [az deployment sub create](/cli/azure/deployment/sub?view=azure-cli-latest#az-deployment-sub-create). The following example deploys a template to create a resource group:
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:
0 commit comments