az group create --name arm-lab-rg --location eastus
Create an ARM template with parameters, a Storage Account resource, and outputs. Use the VS Code ARM Tools extension for JSON schema validation and IntelliSense.
1 { 2 "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", 3 "contentVersion": "1.0.0.0", 4 "parameters": { 5 "storageAccountName": { 6 "type": "string", 7 "minLength": 3, 8 "maxLength": 24, 9 "metadata": { 10 "description": "Globally unique name for the storage account (3-24 chars, lowercase alphanumeric)" 11 } 12 }, 13 "location": { 14 "type": "string", 15 "defaultValue": "[resourceGroup().location]", 16 "metadata": { 17 "description": "Azure region (defaults to resource group location)" 18 } 19 } 20 }, 21 "resources": [ 22 { 23 "type": "Microsoft.Storage/storageAccounts", 24 "apiVersion": "2024-01-01", 25 "name": "[parameters('storageAccountName')]", 26 "location": "[parameters('location')]", 27 "sku": { 28 "name": "Standard_LRS" 29 }, 30 "kind": "StorageV2", 31 "properties": { 32 "minimumTlsVersion": "TLS1_2", 33 "allowBlobPublicAccess": false, 34 "supportsHttpsTrafficOnly": true 35 } 36 } 37 ], 38 "outputs": { 39 "storageEndpoint": { 40 "type": "string", 41 "value": "[reference(parameters('storageAccountName')).primaryEndpoints.blob]" 42 } 43 } 44 }
main.json file with parameters, a StorageAccounts resource, and a blob endpoint output
Sign in to share your feedback and join the discussion.