title: Azure storage enable encryption in ARM
body: <p>I am trying to enable encryption in azure storage during its creation time through ARM. This is the simple storage resource I have.</p>
  
  <pre><code>{
    "$schema": "https://schema.management.azure.com/schemas/2016-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
    "storageAccountName": {
    "type": "String"
  },
    "storageAccountType": {
    "type": "string",
    "defaultValue": "Standard_LRS",
    }
  },
    "variables": {
    "defaultApiVersion": "2016-01-01"
   },
  "resources": [
  {
    "type": "Microsoft.Storage/storageAccounts",
    "name": "[parameters('StorageAccountName')]",
    "apiVersion": "[variables('defaultApiVersion')]",
    "location": "[resourceGroup().location]",
    "sku": {
      "name": "[parameters('storageAccountType')]"
    },
    "properties": {
      "properties": {
        "encryption": {
              "keySource": "Microsoft.Storage",
              "services": {
                  "blob": {
                      "enabled": true
                  }
              }
          }
      }
    }
  }
  ]
  }
  </code></pre>
  
  <p>Which giving me following error </p>
  
  <pre><code>New-AzureRmResourceGroupDeployment : 8:21:59 AM - Error: Code=InvalidTemplate; Message=Deployment template validation failed: 'Template schema 'https://schema.management.azure.com/schemas/2016-01-01/deploymentTemplate.json#' is not supported. Supported versions are '2014-04-01-preview,2015-01-01'.
  </code></pre>
  
  <p>Then I change the schema url to <code>https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#</code></p>
  
  <p>then  got <code>New-AzureRmResourceGroupDeployment : 8:26:40 AM - Error: Code=InvalidTemplateDeployment; Message=The template deployment 'myencryptedstorage' is not valid according to the validation 
  procedure.</code></p>
  
  <p>Anyone know whats is the right way to do this ?</p>