Skip to content

Commit 52d1786

Browse files
committed
added notes about location and name
1 parent a274000 commit 52d1786

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

articles/azure-resource-manager/create-resource-group-in-template.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ ms.devlang: na
1010
ms.topic: conceptual
1111
ms.tgt_pltfrm: na
1212
ms.workload: na
13-
ms.date: 08/20/2018
13+
ms.date: 08/22/2018
1414
ms.author: tomfitz
1515
---
1616
# Create resource groups in Azure Resource Manager templates
1717

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.
1921

2022
This article uses Azure CLI and PowerShell to deploy the templates.
2123

@@ -221,6 +223,7 @@ New-AzureRmDeployment `
221223
```
222224

223225
## Next steps
226+
* To learn about subscription level deployments, see [Deploy resources to an Azure subscription](deploy-to-subscription.md).
224227
* To learn about troubleshooting dependencies during deployment, see [Troubleshoot common Azure deployment errors with Azure Resource Manager](resource-manager-common-deployment-errors.md).
225228
* To learn about creating Azure Resource Manager templates, see [Authoring templates](resource-group-authoring-templates.md).
226229
* For a list of the available functions in a template, see [Template functions](resource-group-template-functions.md).

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.devlang: na
1010
ms.topic: conceptual
1111
ms.tgt_pltfrm: na
1212
ms.workload: na
13-
ms.date: 08/20/2018
13+
ms.date: 08/22/2018
1414
ms.author: tomfitz
1515
---
1616
# Deploy resources to an Azure subscription
@@ -19,6 +19,20 @@ Typically, you deploy resources to a resource group in your Azure subscription.
1919

2020
This article uses Azure CLI and PowerShell to deploy the templates.
2121

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+
2236
## Assign policy
2337

2438
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 `
238252

239253
## Next steps
240254
* 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).
241256
* To learn about creating Azure Resource Manager templates, see [Authoring templates](resource-group-authoring-templates.md).
242257
* For a list of the available functions in a template, see [Template functions](resource-group-template-functions.md).
243258

0 commit comments

Comments
 (0)