Quickstart: Create and deploy ARM templates by using the Azure portal

In this quickstart, you learn how to generate an Azure Resource Manager template (ARM template) in the Azure portal. You edit and deploy the template from the portal.

ARM templates are JSON files that define the resources you need to deploy for your solution. To understand the concepts associated with deploying and managing your Azure solutions, see template deployment overview.

After completing the tutorial, you deploy an Azure Storage account. The same process can be used to deploy other Azure resources.

Resource Manager template quickstart portal diagram

If you don't have an Azure subscription, create a free account before you begin.

Generate a template using the portal

If you're new to Azure deployment, you may find it challenging to create an ARM template. To get around this challenge, you can configure your deployment in the Azure portal and download the corresponding ARM template. You save the template and reuse it in the future.

Many experienced template developers use this method to generate templates when they try to deploy Azure resources that they aren't familiar with. For more information about exporting templates by using the portal, see Export resource groups to templates. The other way to find a working template is from Azure Quickstart templates.

  1. In a web browser, go to the Azure portal and sign in.

  2. From the Azure portal menu, select Create a resource.

    Select Create a resource from Azure portal menu

  3. In the search box, type storage account, and then press [ENTER].

  4. Select the down arrow next to Create, and then select Storage account.

    Create an Azure storage account

  5. Enter the following information:

    Name Value
    Resource group Select Create new, and specify a resource group name of your choice. On the screenshot, the resource group name is mystorage1016rg. Resource group is a container for Azure resources. Resource group makes it easier to manage Azure resources.
    Name Give your storage account a unique name. The storage account name must be unique across all of Azure, and it contain only lowercase letters and numbers. Name must be between 3 and 24 characters. If you get an error message saying "The storage account name 'mystorage1016' is already taken", try using <your name>storage<Today's date in MMDD>, for example johndolestorage1016. For more information, see Naming rules and restrictions.

    You can use the default values for the rest of the properties.

    Create an Azure storage account configuration using the Azure portal


    Some of the exported templates require some edits before you can deploy them.

  6. Select Review + create on the bottom of the screen. Don't select Create in the next step.

  7. Select Download a template for automation on the bottom of the screen. The portal shows the generated template:

    Generate a template from the portal

    The main pane shows the template. It's a JSON file with six top-level elements - schema, contentVersion, parameters, variables, resources, and output. For more information, see Understand the structure and syntax of ARM templates

    There are nine parameters defined. One of them is called storageAccountName. The second highlighted part on the previous screenshot shows how to reference this parameter in the template. In the next section, you edit the template to use a generated name for the storage account.

    In the template, one Azure resource is defined. The type is Microsoft.Storage/storageAccounts. Take a look of how the resource is defined, and the definition structure.

  8. Select Download from the top of the screen.

  9. Open the downloaded zip file, and then save template.json to your computer. In the next section, you use a template deployment tool to edit the template.

  10. Select the Parameter tab to see the values you provided for the parameters. Write down these values, you need them in the next section when you deploy the template.

    Screenshot that highlights the Parameter tab that shows the values you provided.

    Using both the template file and the parameters file, you can create a resource, in this tutorial, an Azure storage account.

Edit and deploy the template

The Azure portal can be used to perform some basic template editing. In this quickstart, you use a portal tool called Template Deployment. Template Deployment is used in this tutorial so you can complete the whole tutorial using one interface - the Azure portal. To edit a more complex template, consider using Visual Studio Code, which provides richer edit functionalities.


Template Deployment provides an interface for testing simple templates. It is not recommended to use this feature in production. Instead, store your templates in an Azure storage account, or a source code repository like GitHub.

Azure requires that each Azure service has a unique name. The deployment could fail if you entered a storage account name that already exists. To avoid this issue, you modify the template to use a template function call uniquestring() to generate a unique storage account name.

  1. From the Azure portal menu, in the search box, type deploy, and then select Deploy a custom template.

    Azure Resource Manager templates library

  2. Select Build your own template in the editor.

  3. Select Load file, and then follow the instructions to load template.json you downloaded in the last section.

    After the file is loaded, you may notice a warning that the template schema wasn't loaded. You can ignore this warning. The schema is valid.

  4. Make the following three changes to the template:

    Azure Resource Manager templates

    • Remove the storageAccountName parameter as shown in the previous screenshot.

    • Add one variable called storageAccountName as shown in the previous screenshot:

      "storageAccountName": "[concat(uniqueString(subscription().subscriptionId), 'storage')]"

      Two template functions are used here: concat() and uniqueString().

    • Update the name element of the Microsoft.Storage/storageAccounts resource to use the newly defined variable instead of the parameter:

      "name": "[variables('storageAccountName')]",

      The final template shall look like:

         "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
         "contentVersion": "",
         "parameters": {
           "location": {
             "type": "string"
           "accountType": {
             "type": "string"
           "kind": {
             "type": "string"
           "accessTier": {
             "type": "string"
           "minimumTlsVersion": {
             "type": "string"
           "supportsHttpsTrafficOnly": {
             "type": "bool"
           "allowBlobPublicAccess": {
             "type": "bool"
           "allowSharedKeyAccess": {
             "type": "bool"
         "variables": {
           "storageAccountName": "[concat(uniqueString(subscription().subscriptionId), 'storage')]"
         "resources": [
             "name": "[variables('storageAccountName')]",
             "type": "Microsoft.Storage/storageAccounts",
             "apiVersion": "2019-06-01",
             "location": "[parameters('location')]",
             "properties": {
               "accessTier": "[parameters('accessTier')]",
               "minimumTlsVersion": "[parameters('minimumTlsVersion')]",
               "supportsHttpsTrafficOnly": "[parameters('supportsHttpsTrafficOnly')]",
               "allowBlobPublicAccess": "[parameters('allowBlobPublicAccess')]",
               "allowSharedKeyAccess": "[parameters('allowSharedKeyAccess')]"
             "dependsOn": [],
             "sku": {
               "name": "[parameters('accountType')]"
             "kind": "[parameters('kind')]",
             "tags": {}
         "outputs": {}
  5. Select Save.

  6. Enter the following values:

    Name Value
    Resource group Select the resource group name you created in the last section.
    Region Select a location for the resource group. For example, Central US.
    Location Select a location for the storage account. For example, Central US.
    Account Type Enter Standard_LRS for this quickstart.
    Kind Enter StorageV2 for this quickstart.
    Access Tier Enter Hot for this quickstart.
    Minimum TLS Version Enter TLS1_0.
    Supports Https Traffic Only Select true for this quickstart.
    Allow Blob Public Access Select false for this quickstart.
    Allow Shared Key Access Select true for this quickstart.
  7. Select Review + create.

  8. Select Create.

  9. Select the bell icon (notifications) from the top of the screen to see the deployment status. You shall see Deployment in progress. Wait until the deployment is completed.

    Azure Resource Manager templates deployment notification

  10. Select Go to resource group from the notification pane. You shall see a screen similar to:

    Azure Resource Manager templates deployment resource group

    You can see the deployment status was successful, and there's only one storage account in the resource group. The storage account name is a unique string generated by the template. To learn more about using Azure storage accounts, see Quickstart: Upload, download, and list blobs using the Azure portal.

Clean up resources

When the Azure resources are no longer needed, clean up the resources you deployed by deleting the resource group.

  1. In the Azure portal, select Resource group on the left menu.
  2. Enter the resource group name in the Filter by name field.
  3. Select the resource group name. You shall see the storage account in the resource group.
  4. Select Delete resource group in the top menu.

Next steps

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's easier to use Visual Studio Code or Visual Studio to develop the template. To learn more about template development, see our new beginner tutorial series: