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/template-tutorial-quickstart-template.md
+16-17Lines changed: 16 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,39 +1,38 @@
1
1
---
2
2
title: Tutorial - Use quickstart templates
3
-
description: Learn how to use Azure Quickstart templates to complete your template development.
3
+
description: Learn how to use Azure Quickstart Templates to complete your template development.
4
4
author: mumian
5
-
ms.date: 03/27/2020
5
+
ms.date: 08/17/2022
6
6
ms.topic: tutorial
7
7
ms.author: jgao
8
8
ms.custom:
9
9
---
10
10
11
-
# Tutorial: Use Azure Quickstart templates
11
+
# Tutorial: Use Azure Quickstart Templates
12
12
13
-
[Azure Quickstart templates](https://azure.microsoft.com/resources/templates/) is a repository of community contributed templates. You can use the sample templates in your template development. In this tutorial, you find a website resource definition, and add it to your own template. It takes about**12 minutes** to complete.
13
+
[Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/) is a repository of community contributed templates. You can use the sample templates in your template development. In this tutorial, you find a website resource definition and add it to your own template. This instruction takes**12 minutes** to complete.
14
14
15
15
## Prerequisites
16
16
17
17
We recommend that you complete the [tutorial about exported templates](template-tutorial-export-template.md), but it's not required.
18
18
19
-
You must have Visual Studio Code with the Resource Manager Tools extension, and either Azure PowerShell or Azure CLI. For more information, see [template tools](template-tutorial-create-first-template.md#get-tools).
19
+
You need to have Visual Studio Code with the Resource Manager Tools extension, and either Azure PowerShell or Azure Command-Line Interface (CLI). For more information, see [template tools](template-tutorial-create-first-template.md#get-tools).
20
20
21
21
## Review template
22
22
23
-
At the end of the previous tutorial, your template had the following JSON:
23
+
At the end of the previous tutorial, your template had the following JSON file:
This template works for deploying storage accounts and app service plans, but you might want to add a website to it. You can use pre-built templates to quickly discover the JSON required for deploying a resource.
28
28
29
29
## Find template
30
30
31
-
1. Open [Azure Quickstart templates](https://azure.microsoft.com/resources/templates/)
32
-
1. In **Search**, enter _deploy linux web app_.
31
+
1. Open [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/)
33
32
1. Select the tile with the title **Deploy a basic Linux web app**. If you have trouble finding it, here's the [direct link](https://azure.microsoft.com/resources/templates/webapp-basic-linux/).
34
33
1. Select **Browse on GitHub**.
35
34
1. Select _azuredeploy.json_.
36
-
1. Review the template. In particular, look for the `Microsoft.Web/sites` resource.
35
+
1. Review the template. Look for the `Microsoft.Web/sites` resource.
37
36
38
37

39
38
@@ -43,13 +42,13 @@ Merge the quickstart template with the existing template:
The web app name needs to be unique across Azure. To prevent having duplicate names, the `webAppPortalName` variable has been updated from `"webAppPortalName": "[concat(parameters('webAppName'), '-webapp')]"` to `"webAppPortalName": "[concat(parameters('webAppName'), uniqueString(resourceGroup().id))]"`.
45
+
The web app name needs to be unique across Azure. To prevent having duplicate names, the `webAppPortalName` variable is updated from `"webAppPortalName": "[concat(parameters('webAppName'), '-webapp')]"` to `"webAppPortalName": "[concat(parameters('webAppName'), uniqueString(resourceGroup().id))]"`.
47
46
48
47
Add a comma at the end of the `Microsoft.Web/serverfarms` definition to separate the resource definition from the `Microsoft.Web/sites` definition.
49
48
50
49
There are a couple of important features to note in this new resource.
51
50
52
-
You'll notice it has an element named `dependsOn` that's set to the app service plan. This setting is required because the app service plan must exist before the web app is created. The `dependsOn` element tells Resource Manager how to order the resources for deployment.
51
+
It has an element named `dependsOn` that's set to the app service plan. This setting is required because the app service plan needs to exist before the web app is created. The `dependsOn` element tells Resource Manager how to order the resources for deployment.
53
52
54
53
The `serverFarmId` property uses the [resourceId](template-functions-resource.md#resourceid) function. This function gets the unique identifier for a resource. In this case, it gets the unique identifier for the app service plan. The web app is associated with one specific app service plan.
55
54
@@ -73,7 +72,7 @@ New-AzResourceGroupDeployment `
73
72
74
73
# [Azure CLI](#tab/azure-cli)
75
74
76
-
To run this deployment command, you must have the [latest version](/cli/azure/install-azure-cli) of Azure CLI.
75
+
To run this deployment command, you need to have the [latest version](/cli/azure/install-azure-cli) of Azure CLI.
77
76
78
77
```azurecli
79
78
az deployment group create \
@@ -86,17 +85,17 @@ az deployment group create \
86
85
---
87
86
88
87
> [!NOTE]
89
-
> If the deployment failed, use the `verbose` switch to get information about the resources being created. Use the `debug` switch to get more information for debugging.
88
+
> If the deployment fails, use the `verbose` switch to get information about the resources you're creating. Use the `debug` switch to get more information for debugging.
90
89
91
90
## Clean up resources
92
91
93
92
If you're moving on to the next tutorial, you don't need to delete the resource group.
94
93
95
-
If you're stopping now, you might want to clean up the resources you deployed by deleting the resource group.
94
+
If you're stopping now, you might want to delete the resource group.
96
95
97
-
1. From the Azure portal, select **Resource group** from the left menu.
98
-
2.Enter the resource group name in the **Filter by name** field.
99
-
3.Select the resource group name.
96
+
1. From the Azure portal, select **Resource groups** from the left menu.
97
+
2.Type the resource group name in the **Filter for any field...** text field.
98
+
3.Check the box next to **myResourceGroup** and select **myResourceGroup** or your resource group name.
100
99
4. Select **Delete resource group** from the top menu.
0 commit comments