title: Creating an Azure Function host key using ARM doesn't work on a new deployment
body: <p>I try to create an Azure Function <strong>host key</strong> inside an <strong>ARM</strong> template where I first create the function, and then I create the key:</p>
  
  <pre><code>{
    "type": "Microsoft.Web/sites/host/functionKeys",
    "apiVersion": "2018-11-01",
    "name": "[concat(parameters('FUNCTIONNAME'), '/default/test-key')]",
    "properties": {
      "name": "test-key",
      "value": "test-value"
    },
    "dependsOn": [
      "[resourceId('Microsoft.Web/sites', parameters('FUNCTIONNAME'))]"
    ]
  }
  </code></pre>
  
  <p>It looks like, that the deployment will add the host key <code>test-key</code> when the function is already deployed. If I deploy the template to a new resource group, the host key is <em>not</em> created. If I run the deployment a second time, it is. </p>
  
  <p>Is there anything wrong with my <code>dependsOn</code> declaration? Any other ideas?</p>