Azure Resource Manager (ARM) templates provide a powerful way to define Azure resources and configuration, by essentially using a text file. This helps with consistency and automation of resource deployments. In this hands-on lab, you will learn how to create a storage account using an ARM template and walk through modifying the template to see how parameters and variables work.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Load the ARM Template Using the Azure Portal
- Download the ARM template to your computer or copy the template text from this link.
- Within the Azure portal, choose Create a resource and use the Template deployment (deploy using custom templates) option.
- Choose Build your own template in the editor and either paste the template text you copied or click Load file and select the labstoragetemplate.json file you downloaded previously.
- Modify the ARM Template Parameters and Variables
- Modify the ARM template as follows:
- Add a parameter called
storageAccountKind
and modify the resource definition to use it. - Create a variable called
uniqueStorageAccountName
and use thestorageAccountName
parameter and auniqueString
function to provide the resource with a unique name. - Change the location of the storage account resource to be hard-coded as
West US
.
- Add a parameter called
- Save the template.
- Modify the ARM template as follows:
- Deploy the ARM Template using the Parameters File
- Edit the parameters file as follows:
- Set the
storageAccountName
toazurelab
. - Set the
storageAccountKind
toStorageV2
.
- Set the
- Save the parameters.
- Deploy the ARM template to the existing subscription and resource group provided for this hands-on lab.
- Edit the parameters file as follows: