1{ 2 "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", 3 "contentVersion": "1.0.0.0", 4 "parameters": { 5 "registryName": { 6 "type": "string", 7 "metadata": { 8 "description": "The name of the container registry." 9 } 10 }, 11 "registryLocation": { 12 "type": "string", 13 "metadata": { 14 "description": "The location of the container registry. This cannot be changed after the resource is created." 15 } 16 }, 17 "registrySku": { 18 "type": "string", 19 "defaultValue": "Classic", 20 "metadata": { 21 "description": "The SKU of the container registry." 22 } 23 }, 24 "registryApiVersion": { 25 "type": "string", 26 "defaultValue": "2017-10-01", 27 "metadata": { 28 "description": "The API version of the container registry." 29 } 30 }, 31 "storageAccountName": { 32 "type": "string", 33 "metadata": { 34 "description": "The name of the storage account used by the container registry." 35 } 36 }, 37 "adminUserEnabled": { 38 "type": "bool", 39 "defaultValue": false, 40 "metadata": { 41 "description": "The value that indicates whether the admin user is enabled." 42 } 43 } 44 }, 45 "resources": [ 46 { 47 "name": "[parameters('storageAccountName')]", 48 "type": "Microsoft.Storage/storageAccounts", 49 "location": "[parameters('registryLocation')]", 50 "apiVersion": "2016-12-01", 51 "tags": { 52 "containerregistry": "[parameters('registryName')]" 53 }, 54 "sku": { 55 "name": "Standard_LRS" 56 }, 57 "kind": "Storage", 58 "properties": { 59 "encryption": { 60 "services": { 61 "blob": { 62 "enabled": true 63 } 64 }, 65 "keySource": "Microsoft.Storage" 66 } 67 } 68 }, 69 { 70 "name": "[parameters('registryName')]", 71 "type": "Microsoft.ContainerRegistry/registries", 72 "location": "[parameters('registryLocation')]", 73 "apiVersion": "[parameters('registryApiVersion')]", 74 "sku": { 75 "name": "[parameters('registrySku')]" 76 }, 77 "dependsOn": [ 78 "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName'))]" 79 ], 80 "properties": { 81 "adminUserEnabled": "[parameters('adminUserEnabled')]", 82 "storageAccount": { 83 "id": "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName'))]" 84 } 85 } 86 } 87 ] 88}