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/resource-manager-quickstart-create-templates-use-the-portal.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -196,7 +196,7 @@ When the Azure resources are no longer needed, clean up the resources you deploy
196
196
197
197
## Next steps
198
198
199
-
In this tutorial, you learned how to generate a template from the Azure portal, and how to deploy the template using the portal. The template used in this Quickstart is a simple template with one Azure resource. When the template is complex, it is easier to use Visual Studio Code or Visual Studio to develop the template.
199
+
In this tutorial, you learned how to generate a template from the Azure portal, and how to deploy the template using the portal. The template used in this Quickstart is a simple template with one Azure resource. When the template is complex, it is easier to use Visual Studio Code or Visual Studio to develop the template. The next quickstart also show you how to deploy templates using Azure PowerShell and Azure Command-line Interface (CLI).
200
200
201
201
> [!div class="nextstepaction"]
202
202
> [Create templates by using Visual Studio Code](./resource-manager-quickstart-create-templates-use-visual-studio-code.md)
#Customer intent: As a developer new to Azure deployment, I want to learn how to create a resource manager template so I can deploy Azure resources.
18
+
#Customer intent: As a developer new to Azure deployment, I want to learn how to create a resource manager template using Visual Studio Code, so I can deploy Azure resources.
19
19
20
20
---
21
21
@@ -88,32 +88,49 @@ To learn how to edit a template using Visual Studio Code, you add one more eleme
88
88
89
89
## Deploy the template
90
90
91
-
There are many methods for deploying templates. In this quickstart, you use the Cloud shell from the Azure portal. The Cloud shell supports both Azure CLI and Azure PowerShell. The instructions provided here use CLI.
91
+
There are many methods for deploying templates. In this quickstart, you use Azure Cloud Shell from the Azure portal. Cloud Shell supports both Azure CLI and Azure PowerShell.
92
92
93
93
1. Sign in to the [Azure portal](https://portal.azure.com)
94
94
2. Select **Cloud Shell** from the upper right corner as shown in the following image:
3. Select the down arrow and then select **Bash** to switch to CLI from PowerShell.
98
+
Cloud Shell is opened on the bottom of the screen.
99
+
100
+
3. On the upper left corner of the Cloud shell, it shows either **PowerShell** or **Bash**. To use CLI, you need to open a Bash session. To run PowerShell, you need to open a PowerShell session. To switch, select the down arrow, and then select the interpreter. The following image shows switching from PowerShell to Bash.
4. Select the file you saved earlier in the quickstart. The default name is **azuredeploy.json**.
106
-
5. From the Cloud shell, run the **ls** command to verify the file is uploaded successfully. You can also use the **cat** command to verify the template content.
108
+
109
+
You must upload the template file before you can deploy it from the shell.
110
+
5. Select the file you saved earlier in the quickstart. The default name is **azuredeploy.json**.
111
+
6. From the Cloud shell, run the **ls** command to verify the file is uploaded successfully. You can also use the **cat** command to verify the template content. The following image shows running the command from Bash. You use the same commands from a PowerShell session.
107
112
108
113

109
-
6. From the Cloud shell, run the following commands:
114
+
7. From the Cloud shell, run the following commands. Select the tab to show the PowerShell code or the CLI code.
110
115
116
+
# [CLI](#tab/CLI)
111
117
```cli
112
118
az group create --name <ResourceGroupName> --location <AzureLocation>
113
119
114
120
az group deployment create --name <DeploymentName> --resource-group <ResourceGroupName> --template-file <TemplateFileName>
@@ -143,7 +169,7 @@ When the Azure resources are no longer needed, clean up the resources you deploy
143
169
144
170
## Next steps
145
171
146
-
In this tutorial, you learned how to create a template using Visual Studio Code, and how to deploy the template using the Azure portal Cloud shell. In the next tutorial, you learn more about how to develop a template, and how to use template reference.
172
+
The primary focus of this tutorial is to use Visual Studio Code to edit an existing template from Azure Quickstart templates. You also learned how to deploy the template using either CLI or PowerShell from Azure Cloud Shell. The templates from Azure Quickstart templates might not give you everything you need. The next tutorial shows you how to find the information from template reference so you can create an encrypted Azure Storage account.
147
173
148
174
> [!div class="nextstepaction"]
149
-
> [Create an encrypted Storage account](./resource-manager-tutorial-create-encrypted-storage-accounts.md)
175
+
> [Create an encrypted storage account](./resource-manager-tutorial-create-encrypted-storage-accounts.md)
@@ -27,9 +27,7 @@ This tutorial covers the following tasks:
27
27
28
28
> [!div class="checklist"]
29
29
> * Open a Quickstart template
30
-
> * Understand the template format
31
-
> * Use parameters in template
32
-
> * Use variables in template
30
+
> * Understand the template
33
31
> * Edit the template
34
32
> * Deploy the template
35
33
@@ -98,7 +96,7 @@ Variables allow you to construct values that can be used throughout your templat
98
96
This template defines one variable *storageAccountName*. In the definition, two template functions are used:
99
97
100
98
-**concat()**: concatenates strings. For more information, see [concat](./resource-group-template-functions-string.md#concat).
101
-
-**uniqueString()**: creates a deterministic hash string based on the values provided as parameters. Each Azure storage account must have an unique name across of all Azure. This function provides an unique string. For more string functions, see [String functions](./resource-group-template-functions-string.md).
99
+
-**uniqueString()**: creates a deterministic hash string based on the values provided as parameters. Each Azure storage account must have a unique name across of all Azure. This function provides a unique string. For more string functions, see [String functions](./resource-group-template-functions-string.md).
102
100
103
101
To use the variable defined in the template:
104
102
@@ -108,10 +106,10 @@ To use the variable defined in the template:
108
106
109
107
## Edit the template
110
108
111
-
To find the storage account encryption-related configuration, you can use the template reference of Azure Storage account.
109
+
The goal of this tutorial is to define a template to create an encrypted storage account. The sample template only creates a basic unencrypted storage account. To find the encryption-related configuration, you can use the template reference of Azure Storage account.
112
110
113
111
1. Browse to [Azure Templates](https://docs.microsoft.com/azure/templates/).
114
-
2. From the TOC on the left, select **Reference**->**Storage**->**Storage Accounts**. The page contains the information for defining a Storage Account information.
112
+
2. From the TOC on the left, select **Reference**->**Storage**->**Storage Accounts**. You can also enter **storage** in the **Filter by title** field. The page contains the schema for defining a Storage Account information.
115
113
3. Explore the encryption-related information.
116
114
4. Inside the properties element of the storage account resource definition, add the following json:
117
115
@@ -127,59 +125,17 @@ To find the storage account encryption-related configuration, you can use the te
127
125
```
128
126
This part enables the encryption function of the blob storage service.
129
127
130
-
The final resources element looks like:
128
+
From Visual Studio Code, modify the template so that the final resources element looks like:
There are many methods for deploying templates. In this tutorial, you usethe Cloud shell from the Azure portal. The Cloud shell supports both Azure CLI and Azure PowerShell. The instructions provided here use CLI.
134
+
Refer to the [Deploy the template](./resource-manager-quickstart-create-templates-use-visual-studio-code.md#deploy-the-template) section in the Visual Studio Code quickstart for the deployment procedure.
137
135
138
-
1. Sign in to the [Azure portal](https://portal.azure.com)
139
-
2. Select **Cloud Shell** from the upper right corner as shown in the following image:
136
+
The following screenshot shows the CLI command for listing the newly created storage account, which indicates encryption has been enabled for the blob storage.
6. Select the file you saved earlier in the tutorial. The default name is **azuredeploy.json**.
151
-
7. From the Cloud shell, run the **ls** command to verify the file is uploaded successfully. You can also use the **cat** command to verify the template content.
152
-
153
-

154
-
8. From the Cloud shell, run the following commands:
155
-
156
-
```cli
157
-
az group create --name <ResourceGroupName> --location <AzureLocation>
158
-
159
-
az group deployment create --name <DeploymentName> --resource-group <ResourceGroupName> --template-file azuredeploy.json
@@ -192,7 +148,7 @@ When the Azure resources are no longer needed, clean up the resources you deploy
192
148
193
149
## Next steps
194
150
195
-
In this tutorial, you learned how to use template reference to customize an existing template. The template used in this tutorial only contains one Azure resource. In the next tutorial, you develop a template with multiple resources. Some of the resources have dependent resources.
151
+
In this tutorial, you learned how to use template reference to customize an existing template. The template used in this tutorial only contains one Azure resource. In the next tutorial, you develop a template with multiple resources. Some of the resources have dependent resources.
@@ -53,12 +53,27 @@ Azure QuickStart Templates is a repository for Resource Manager templates. Inste
53
53
54
54
## Explore the template
55
55
56
+
When you explore the template in this section, try to answer these questions:
57
+
58
+
- How many Azure resources defined in this template?
59
+
- One of the resources is an Azure storage account. Does the definition look like the one used in the last tutorial?
60
+
- Can you find the template references for the resources defined in this template?
61
+
- Can you find the dependencies of the resources?
62
+
56
63
1. From Visual Studio Code, collapse the elements until you only see the first-level elements and the second-level elements inside **resources**:
57
64
58
65

59
66
60
67
There are five resources defined by the template.
61
-
2. Expand the fourth element:
68
+
2. Expand the first resource. It is a storage account. The definition shall be identical to the one used at the begining of the last tutorial.
69
+
70
+

71
+
72
+
3. Expand the second resource. The resource type is **Microsoft.Network/publicIPAddresses**. To find the template reference, browse to [template reference](https://docs.microsoft.com/azure/templates/), enter **public ip address** or **public ip addresses** in the **Filter by title** field. Compare the resource definition to the template reference.
73
+
74
+

75
+
4. Repeat the last step to find the template references for the other resources defined in this template. Compare the resource definitions to the references.
76
+
5. Expand the fourth resource:
62
77
63
78

64
79
@@ -67,7 +82,7 @@ Azure QuickStart Templates is a repository for Resource Manager templates. Inste
67
82
* publicIPAddress
68
83
* virtualNetwork
69
84
70
-
3. Expand the fifth element. This resource is a virtual machine. It depends on two other resources:
85
+
6. Expand the fifth resource. This resource is a virtual machine. It depends on two other resources:
0 commit comments