How do I access the server farm resource id for a web app from within linked ARM template files?
<p>I've got a master ARM deployment file with these resources:</p>

<pre><code>{
  "apiVersion": "2015-01-01",
  "name": "SharedServicePlanTemplate",
  "type": "Microsoft.Resources/deployments",
  "properties": {
    "templateLink": { "uri": "[concat(variables('templateBase'), 'serviceplan.template.json')]" },
    "parametersLink": { "uri": "[concat(variables('parametersBase'), 'serviceplan.shared.json')]" },
    "mode": "Incremental"
  }
},
{
  "name": "my_website",
  "type": "Microsoft.Web/sites",
  "location": "[resourceGroup().location]",
  "apiVersion": "2015-08-01",
  "dependsOn": [
    "[resourceId('Microsoft.Web/serverfarms', 'ServicePlanShared')]"
  ],
  "tags": {
    "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', 'ServicePlanShared')]": "Resource",
    "displayName": "my_website"
  },
  "properties": {
    "name": "my_website",
    "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', 'ServicePlanShared')]"
  }
}
</code></pre>

<p>When I try to deploy, I get the following error:</p>

<p><code>New-AzureRmResourceGroupDeployment : InvalidTemplate: Deployment template validation failed: 'The resource
'Microsoft.Web/serverfarms/ServicePlanShared' is not defined in the template.</code></p>

<p>I thought that was the whole reason for using the <code>resourceId</code> function, though. I can merge my <code>serviceplan.template.json</code> and the website resource into the same template file, but I'd rather not do that since I will have multiple websites using that plan, and I want to be able to deploy them separately.</p>