Skip to content

Commit e83e6f1

Browse files
committed
addressing review feedback
1 parent 0390ef9 commit e83e6f1

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

articles/azure-resource-manager/templates/quickstart-create-templates-use-visual-studio-code.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,111 +10,111 @@ ms.author: nepeters
1010

1111
---
1212

13-
# Quickstart: Create Azure Resource Manager templates by using Visual Studio Code
13+
# Quickstart: Create Azure Resource Manager templates with Visual Studio Code
1414

15-
The Azure Resource Manager (ARM) Tools for Visual Studio Code provide language support, resource snippets, and resource autocompletion. These tools help create and validate Azure Resource Manager templates. In this quickstart, you use the ARM tools to create an Azure Resource Manager template from scratch. While doing so you experience ARM tools capabilities such as ARM template snippets, validation, completions, and parameter file support.
15+
The Azure Resource Manager Tools for Visual Studio Code provide language support, resource snippets, and resource autocompletion. These tools help create and validate Azure Resource Manager templates. In this quickstart, you use the extension to create an Azure Resource Manager template from scratch. While doing so you experience the extensions capabilities such as ARM template snippets, validation, completions, and parameter file support.
1616

17-
To complete this quickstart, you need [Visual Studio Code](https://code.visualstudio.com/), with the [Azure Resource Manager (ARM) tools extension](https://marketplace.visualstudio.com/items?itemName=msazurermtools.azurerm-vscode-tools) installed. You also need either the [Azure CLI](https://docs.microsoft.com/cli/azure/?view=azure-cli-latest) or the [Azure PowerShell module](https://docs.microsoft.com/powershell/azure/new-azureps-module-az?view=azps-3.7.0) installed and authenticated.
17+
To complete this quickstart, you need [Visual Studio Code](https://code.visualstudio.com/), with the [Azure Resource Manager tools extension](https://marketplace.visualstudio.com/items?itemName=msazurermtools.azurerm-vscode-tools) installed. You also need either the [Azure CLI](https://docs.microsoft.com/cli/azure/?view=azure-cli-latest) or the [Azure PowerShell module](https://docs.microsoft.com/powershell/azure/new-azureps-module-az?view=azps-3.7.0) installed and authenticated.
1818

1919
If you don't have an Azure subscription, [create a free account](https://azure.microsoft.com/free/) before you begin.
2020

2121
## Create an ARM template
2222

23-
Create and open with Visual Studio Code a new file named *azuredeploy.json*. Enter `arm` into the code editor, which initiates ARM Tools snippets for scaffolding out an ARM template.
23+
Create and open with Visual Studio Code a new file named *azuredeploy.json*. Enter `arm` into the code editor, which initiates Azure Resource Manager snippets for scaffolding out an ARM template.
2424

2525
Select `arm!` to create a template scoped for an Azure resource group deployment.
2626

27-
![](./media/quickstart-create-templates-use-visual-studio-code/1.png)
27+
![Image showing Azure Resource Manager scafolding](./media/quickstart-create-templates-use-visual-studio-code/1.png)
2828

2929
This snippet creates the basic building blocks for an ARM template.
3030

31-
![](./media/quickstart-create-templates-use-visual-studio-code/2.png)
31+
![Image showing a fully scaffolded ARM template](./media/quickstart-create-templates-use-visual-studio-code/2.png)
3232

33-
Notice that the VS Code language mode has changed from *JSON* to *Azure Resource Manager Template*. The ARM Tools extension includes a language server specific to ARM templates which provides ARM template-specific validation, completion, and other language services.
33+
Notice that the Visual Studio Code language mode has changed from *JSON* to *Azure Resource Manager Template*. The extension includes a language server specific to ARM templates which provides ARM template-specific validation, completion, and other language services.
3434

35-
![](./media/quickstart-create-templates-use-visual-studio-code/3.png)
35+
![Image showing Azure Resource Manager as the Visual Studio Code language mode](./media/quickstart-create-templates-use-visual-studio-code/3.png)
3636

3737
## Add an Azure resource
3838

39-
The ARM Tools extension includes snippets for many Azure resources. These snippets can be used to easily add resources to your template deployment.
39+
The extension includes snippets for many Azure resources. These snippets can be used to easily add resources to your template deployment.
4040

4141
Place the cursor in the template **resources** block, type in `storage`, and select the *arm-storage* snippet.
4242

43-
![](./media/quickstart-create-templates-use-visual-studio-code/4.png)
43+
![Image showing a resource being added to the ARM template](./media/quickstart-create-templates-use-visual-studio-code/4.png)
4444

4545
This action adds a storage resource to the template.
4646

47-
![](./media/quickstart-create-templates-use-visual-studio-code/5.png)
47+
![Image showing an Azure Storage resource in an ARM template](./media/quickstart-create-templates-use-visual-studio-code/5.png)
4848

4949
The **tab** key can be used to tab through configurable properties on the storage account.
5050

51-
![](./media/quickstart-create-templates-use-visual-studio-code/6.png)
51+
![Image showing how the tab key can be used to navigate through resource configuration](./media/quickstart-create-templates-use-visual-studio-code/6.png)
5252

5353
## Completion and validation
5454

55-
One of the most powerful capabilities of the ARM Tools extension for VS Code is its integration with Azure schemas. Azure schemas provide the extension with validation and resource-aware completion capabilities. Let's modify the storage account to see validation and completion in action.
55+
One of the most powerful capabilities of the extension is its integration with Azure schemas. Azure schemas provide the extension with validation and resource-aware completion capabilities. Let's modify the storage account to see validation and completion in action.
5656

5757
First, update the storage account kind to an invalid value such as `megaStorage`. Notice that this action produces a warning indicating that `megaStorage` is not a valid value.
5858

59-
![](./media/quickstart-create-templates-use-visual-studio-code/7.png)
59+
![Image showing an invalid storage configuration](./media/quickstart-create-templates-use-visual-studio-code/7.png)
6060

6161
To use the completion capabilities, remove `megaStorage`, place the cursor inside of the double quotes, and press `ctrl` + `space`. This action presents a completion list of valid values.
6262

63-
![](./media/quickstart-create-templates-use-visual-studio-code/8.png)
63+
![Image showing extension auto-completion](./media/quickstart-create-templates-use-visual-studio-code/8.png)
6464

6565
## Add template parameters
6666

6767
Now create and use a parameter to specify the storage account name.
6868

6969
Place your cursor in the parameters block, add a carriage return, type `par`, and then select the `arm-param-value` snippet. This action adds a generic parameter to the template.
7070

71-
![](./media/quickstart-create-templates-use-visual-studio-code/9.png)
71+
![Image showing a parameter being added to the ARM template](./media/quickstart-create-templates-use-visual-studio-code/9.png)
7272

7373
Update the name of the parameter to `storageAccountName` and the description to `Storage Account Name`.
7474

75-
![](./media/quickstart-create-templates-use-visual-studio-code/10.png)
75+
![Image showing the completed parameter in an ARM template](./media/quickstart-create-templates-use-visual-studio-code/10.png)
7676

7777
Azure storage account names have a minimum length of 3 characters and a maximum of 24. Add both `minLength` and `maxLength` to the parameter and provide appropriate values.
7878

79-
![](./media/quickstart-create-templates-use-visual-studio-code/11.png)
79+
![Image showing minLength and maxLength being added to an ARM template parameter](./media/quickstart-create-templates-use-visual-studio-code/11.png)
8080

81-
Now, on the storage resource, update the name property to use the parameter. To do so, remove the current name. Enter a double quote and an opening square bracket `[`, which produces a list of ARM functions. Select *parameters* from the list.
81+
Now, on the storage resource, update the name property to use the parameter. To do so, remove the current name. Enter a double quote and an opening square bracket `[`, which produces a list of ARM template functions. Select *parameters* from the list.
8282

83-
![](./media/quickstart-create-templates-use-visual-studio-code/12.png)
83+
![Image showing auto-completion when using parameters in ARM template resources](./media/quickstart-create-templates-use-visual-studio-code/12.png)
8484

8585
Entering a single quote `'` inside of the round brackets produces a list of all parameters defined in the template, in this case, *storageAccountName*. Select the parameter.
8686

87-
![](./media/quickstart-create-templates-use-visual-studio-code/13.png)
87+
![Image showing completed parameter in an ARM template resource](./media/quickstart-create-templates-use-visual-studio-code/13.png)
8888

8989
## Create a parameter file
9090

9191
An ARM template parameter file allows you to store environment-specific parameter values and pass these values in as a group at deployment time. For example, you may have a parameter file with values specific to a test environment and another for a production environment.
9292

93-
The ARM Tools extension for VS Code makes it easy to create a parameter file from your existing templates. To do so, right-click on the template in the code editor and select `Select/Create Parameter File`.
93+
The extension makes it easy to create a parameter file from your existing templates. To do so, right-click on the template in the code editor and select `Select/Create Parameter File`.
9494

95-
![](./media/quickstart-create-templates-use-visual-studio-code/14.png)
95+
![Image showing the right-click process for creating a parameter file from an ARM tempalte](./media/quickstart-create-templates-use-visual-studio-code/14.png)
9696

9797
Select `New` > `All Parameters` > Select a name and location for the parameter file.
9898

99-
![](./media/quickstart-create-templates-use-visual-studio-code/15.png)
99+
![Image showing the name and save file dialog when creating a parameters file from an ARM template](./media/quickstart-create-templates-use-visual-studio-code/15.png)
100100

101-
This action creates a new parameters file and maps it with the template from which it was created. You can see and modify the current template/parameter file mapping in the VS Code status bar while the template is selected.
101+
This action creates a new parameter file and maps it with the template from which it was created. You can see and modify the current template/parameter file mapping in the Visual Studio Code status bar while the template is selected.
102102

103103
![](./media/quickstart-create-templates-use-visual-studio-code/16.png)
104104

105-
Now that the parameter file has been mapped to the template, the ARM Tools extension validates both the template and parameter file together. To see this validation in practice, add a two-character value to the `storageAccountName` parameter in the parameter file and save the file.
105+
Now that the parameter file has been mapped to the template, the extension validates both the template and parameter file together. To see this validation in practice, add a two-character value to the `storageAccountName` parameter in the parameter file and save the file.
106106

107-
![](./media/quickstart-create-templates-use-visual-studio-code/17.png)
107+
![Image showing an invalidated template due to parameter file issue](./media/quickstart-create-templates-use-visual-studio-code/17.png)
108108

109109
Navigate back to the ARM template and notice that an error has been raised indicating that the value does not meet the parameter criteria.
110110

111-
![](./media/quickstart-create-templates-use-visual-studio-code/18.png)
111+
![Image showing a valid ARM tempalte](./media/quickstart-create-templates-use-visual-studio-code/18.png)
112112

113113
Update the value to something appropriate, save the file, and navigate back to the template. Notice that the error on the parameter has been resolved.
114114

115115
## Deploy the template
116116

117-
Open the integrated VS Code terminal using the `ctrl` + ```` ` ```` key combination and use either the Azure CLI or Azure PowerShell module to deploy the template.
117+
Open the integrated Visual Studio Code terminal using the `ctrl` + ```` ` ```` key combination and use either the Azure CLI or Azure PowerShell module to deploy the template.
118118

119119
# [CLI](#tab/CLI)
120120

0 commit comments

Comments
 (0)