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/create-resource-group-in-template.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,12 +10,14 @@ ms.devlang: na
10
10
ms.topic: conceptual
11
11
ms.tgt_pltfrm: na
12
12
ms.workload: na
13
-
ms.date: 08/20/2018
13
+
ms.date: 08/22/2018
14
14
ms.author: tomfitz
15
15
---
16
16
# Create resource groups in Azure Resource Manager templates
17
17
18
-
To create a resource group in an Azure Resource Manager template, define a **Microsoft.Resources/resourceGroups** resource with a name and location for the resource group. Deploy the template to your Azure subscription. You can also deploy resources to that resource group in the same template.
18
+
To create a resource group in an Azure Resource Manager template, define a **Microsoft.Resources/resourceGroups** resource with a name and location for the resource group. Deploy the template to your Azure subscription. For more information about subscription level deployments, see [Deploy resources to an Azure subscription](deploy-to-subscription.md).
19
+
20
+
You can also deploy resources to that resource group in the same template.
19
21
20
22
This article uses Azure CLI and PowerShell to deploy the templates.
21
23
@@ -221,6 +223,7 @@ New-AzureRmDeployment `
221
223
```
222
224
223
225
## Next steps
226
+
* To learn about subscription level deployments, see [Deploy resources to an Azure subscription](deploy-to-subscription.md).
224
227
* To learn about troubleshooting dependencies during deployment, see [Troubleshoot common Azure deployment errors with Azure Resource Manager](resource-manager-common-deployment-errors.md).
225
228
* To learn about creating Azure Resource Manager templates, see [Authoring templates](resource-group-authoring-templates.md).
226
229
* For a list of the available functions in a template, see [Template functions](resource-group-template-functions.md).
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/deploy-to-subscription.md
+16-1Lines changed: 16 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ ms.devlang: na
10
10
ms.topic: conceptual
11
11
ms.tgt_pltfrm: na
12
12
ms.workload: na
13
-
ms.date: 08/20/2018
13
+
ms.date: 08/22/2018
14
14
ms.author: tomfitz
15
15
---
16
16
# Deploy resources to an Azure subscription
@@ -19,6 +19,20 @@ Typically, you deploy resources to a resource group in your Azure subscription.
19
19
20
20
This article uses Azure CLI and PowerShell to deploy the templates.
21
21
22
+
## Name and location for deployment
23
+
24
+
When deploying to your subscription, you must provide a location for the deployment. You can also provide a name for the deployment. If you don't specify a name for the deployment, the name of the template is used as the deployment name. For example, deploying a template named **azuredeploy.json** creates a default deployment name of **azuredeploy**.
25
+
26
+
The location of subscription level deployments is immutable. You can't create a deployment in one location when there's an existing deployment with the same name but different location. If you get the error code `InvalidDeploymentLocation`, either use a different name or the same location as the previous deployment for that name.
27
+
28
+
## Using template functions
29
+
30
+
For subscription level deployments, there are some important considerations when using template functions:
31
+
32
+
* The [resourceGroup()](resource-group-template-functions-resource.md#resourcegroup) function is **not** supported.
33
+
* The [resourceId()](resource-group-template-functions-resource.md#resourceid) function is supported. Use it to get the resource ID for resources that are used at subscription level deployments. For example, get the resource ID for a policy definition with `resourceId('Microsoft.Authorization/roleDefinitions/', parameters('roleDefinition'))`
34
+
* The [reference()](resource-group-template-functions-resource.md#reference) and [list()](resource-group-template-functions-resource.md#list) functions are supported.
35
+
22
36
## Assign policy
23
37
24
38
The following example assigns an existing policy definition to the subscription. If the policy takes parameters, provide them as an object. If the policy doesn't take parameters, use the default empty object.
@@ -238,6 +252,7 @@ New-AzureRmDeployment `
238
252
239
253
## Next steps
240
254
* For an example of deploying workspace settings for Azure Security Center, see [deployASCwithWorkspaceSettings.json](https://github.com/krnese/AzureDeploy/blob/master/ARM/deployments/deployASCwithWorkspaceSettings.json).
255
+
* To create a resource group, see [Create resource groups in Azure Resource Manager templates](create-resource-group-in-template.md).
241
256
* To learn about creating Azure Resource Manager templates, see [Authoring templates](resource-group-authoring-templates.md).
242
257
* For a list of the available functions in a template, see [Template functions](resource-group-template-functions.md).
0 commit comments