title: Azure ARM Template dependsOn: Resource Not Defined in Template
body: <p>I want to create a new vm to resource group in azure with visual studio 2015.
  the new vm depends on an existing resource in the same resource group , that isn’t declared in the template. but I got "The resource 'Microsoft.Storage/storageAccounts/***' is 
  02:21:10 - not defined in the template"</p>
  
  <pre><code>"resources": [
  {
    "apiVersion": "2015-06-15",
    "type": "Microsoft.Compute/virtualMachines",
    "name": "[variables('vmName')]",
    "location": "[resourceGroup().location]",
    "tags": {
      "displayName": "VirtualMachine"
    },
    "dependsOn": [
      "[resourceId('0abb7c58-93b4-45f4-b1be-61a98ac347a3','securitydata','Microsoft.Storage/storageAccounts', parameters('storageAccounts_simscitestrg6892_name'))]"
    ],
  </code></pre>
  
  <p>DependsOn can only refer to resources in the same ARM template ?</p>
  
  <p>Any help appreciated.</p>
  
  <p>Regards, Frank.</p>