Skip to content

Files

Latest commit

 

History

History
92 lines (78 loc) · 4.87 KB

resource-manager-template-storage.md

File metadata and controls

92 lines (78 loc) · 4.87 KB
title description services documentationcenter author manager editor ms.assetid ms.service ms.devlang ms.topic ms.tgt_pltfrm ms.workload ms.date ms.author
Resource Manager template for storage | Microsoft Docs
Shows the Resource Manager schema for deploying storage accounts through a template.
azure-resource-manager,storage
na
tfitzmac
timlt
25d35683-fe99-4a11-8b1a-b80accab58e7
azure-resource-manager
na
article
na
na
04/05/2016
tomfitz

Storage account template schema

Creates a storage account.

Schema format

To create a storage account, add the following schema to the resources section of your template.

{
    "type": "Microsoft.Storage/storageAccounts",
    "apiVersion": "2015-06-15",
    "name": string,
    "location": string,
    "properties": 
    {
        "accountType": string
    }
}

Values

The following tables describe the values you need to set in the schema.

Name Value
type Enum
Required
Microsoft.Storage/storageAccounts

The resource type to create.
apiVersion Enum
Required
2015-06-15 or 2015-05-01-preview

The API version to use for creating the resource.
name String
Required
Between 3 and 24 characters, only numbers and lower-case letters.

The name of the storage account to create. The name must be unique across all of Azure. Consider using the uniqueString function with your naming convention as shown in the example below.
location String
Required
A region that supports storage accounts. To determine valid regions, see supported regions.

The region to host the storage account.
properties Object
Required
properties object

An object that specifies the type of storage account to create.
Name Value
accountType String
Required
Standard_LRS, Standard_ZRS, Standard_GRS, Standard_RAGRS, or Premium_LRS

The type of storage account. The permitted values correspond to Standard Locally Redundant, Standard Zone Redundant, Standard Geo-Redundant, Standard Read-Access Geo-Redundant, and Premium Locally Redundant. For information about these account types, see Azure Storage replication.

Examples

The following example deploys a Standard Locally Redundant storage account with a unique name based on the resource group id.

{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {},
    "variables": {},
    "resources": [
        {
            "type": "Microsoft.Storage/storageAccounts",
            "apiVersion": "2015-06-15",
            "name": "[concat('storage', uniqueString(resourceGroup().id))]",
            "location": "[resourceGroup().location]",
            "properties": 
        {
                "accountType": "Standard_LRS"
        }
        }
    ],
    "outputs": {}
}

Quickstart templates

There are many quickstart templates that include a storage account. The following templates illustrate some common scenarios:

Next steps