Azure · Cloudintermediate
Azure ARM Template — Storage Account
An Azure Resource Manager (ARM) deployment template that provisions a storage account with parameters, variables and outputs — the canonical ARM structure.
azurearmiacstoragedeployment
Preview
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccountName": {
"type": "string",
"metadata": {
"description": "Globally unique storage account name"
}
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]"
}
},
"variables": {
"sku": "Standard_LRS"
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2023-01-01",
"name": "[parameters('storageAccountName')]",
"location": "[parameters('location')]",
"sku": {
"name": "[variables('sku')]"
},
"kind": "StorageV2",
"properties": {
"supportsHttpsTrafficOnly": true,
"minimumTlsVersion": "TLS1_2"
}
}
],
"outputs": {
"storageId": {
"type": "string",
"value": "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName'))]"
}
}
}AI actions
Documentation
Purpose
Declaratively provision Azure resources — here a storage account — with reusable parameters and computed variables.
When to use
Deploying Azure infrastructure as code via `az deployment group create`, or wiring resources into a CI/CD pipeline.
Required fields
- $schema — the ARM template schema URL
- contentVersion — your template version string
- resources — the array of resources to deploy
Optional fields
- parameters — inputs supplied at deploy time
- variables — values computed from parameters
- outputs — values returned after deployment
Best practices
- Parameterize anything that differs per environment (name, SKU, location).
- Use variables to avoid repeating computed expressions.
- Pin apiVersion per resource type; do not float it.
Security considerations
- Never hardcode secrets; use Key Vault references in parameters.
- Set supportsHttpsTrafficOnly to true on storage accounts.
- Scope role assignments narrowly in separate templates.