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 |
Creates a storage account.
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
}
}
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. |
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": {}
}
There are many quickstart templates that include a storage account. The following templates illustrate some common scenarios:
- Create a Standard Storage Account
- Simple deployment of an Windows VM
- Simple deployment of an Linux VM
- [Create a CDN Profile, a CDN Endpoint with a Storage Account as origin]https://github.com/Azure/azure-quickstart-templates/tree/master/201-cdn-with-storage-account)
- Create a High Availabilty SharePoint Farm with 9 VMs using the Powershell DSC Extension
- Simple deployment of a 5 Node secure Service Fabric Cluster with WAD enabled
- Create a Virtual Machine from a Windows Image with 4 Empty Data Disks
- For general information about storage, see Introduction to Microsoft Azure Storage.
- For example templates that use a new storage account with a Virtual Machine, see Deploy a simple Linux VM or Deploy a simple Windows VM.