title: unable to deploy azure function app through the arm template
body: <p>Hi I have created azure funnction app with .net core. I created everything through management portal. Its working fine. I am trying to write arm templates for the resource creations. So I exported arm template from portal and through azure devops I am running it to create resources. I have selected increment changes. Below is my sample template.</p>
  <pre><code>{
              &quot;type&quot;: &quot;Microsoft.Web/sites&quot;,
              &quot;apiVersion&quot;: &quot;2018-11-01&quot;,
              &quot;name&quot;: &quot;[variables('fetchSciHubProductURLName')]&quot;,
              &quot;location&quot;: &quot;[parameters('location')]&quot;,
              &quot;tags&quot;: {
                  &quot;BU&quot;: &quot;[parameters('Division')]&quot;,
                  &quot;Environment&quot;: &quot;[parameters('environment')]&quot;
              },
              &quot;kind&quot;: &quot;functionapp,linux&quot;,
              &quot;properties&quot;: {
                  &quot;serverFarmId&quot;: &quot;[parameters('serverfarms_APSERDEVDVLGENSEAWE01_Linux_externalid')]&quot;,
                  &quot;clientAffinityEnabled&quot;: false,
                  &quot;httpsOnly&quot;: false,
                  &quot;siteConfig&quot;: {
                    &quot;reservedInstanceCount&quot;: &quot;0&quot;,
                    &quot;appSettings&quot;: [
                      {
                        &quot;name&quot;: &quot;AzureWebJobsStorage&quot;,
                        &quot;value&quot;: &quot;secrete&quot;
                      },
                      {
                        &quot;name&quot;: &quot;APPINSIGHTS_INSTRUMENTATIONKEY&quot;,
                        &quot;value&quot;: &quot;[parameters('storageAccount01APPINSIGHTS_INSTRUMENTATIONKEY')]&quot;
                      },
                      {
                        &quot;name&quot;: &quot;APPLICATIONINSIGHTS_CONNECTION_STRING&quot;,
                        &quot;value&quot;: &quot;[parameters('storageAccount01APPLICATIONINSIGHTS_CONNECTION_STRING')]&quot;
                      },
                      {
                        &quot;name&quot;: &quot;FUNCTIONS_EXTENSION_VERSION&quot;,
                        &quot;value&quot;: &quot;~3&quot;
                      },
                      {
                        &quot;name&quot;: &quot;FUNCTIONS_WORKER_RUNTIME&quot;,
                        &quot;value&quot;: &quot;dotnet&quot;
                      },
                      {
                        &quot;name&quot;: &quot;WEBSITE_ENABLE_SYNC_UPDATE_SITE&quot;,
                        &quot;value&quot;: &quot;true&quot;
                      },
                      {
                        &quot;name&quot;: &quot;WEBSITE_RUN_FROM_PACKAGE&quot;,
                        &quot;value&quot;: &quot;1&quot;
                      },
                      {
                        &quot;name&quot;: &quot;WEBSITES_ENABLE_APP_SERVICE_STORAGE&quot;,
                        &quot;value&quot;: &quot;true&quot;
                      },
                      {
                        &quot;name&quot;: &quot;test1&quot;,
                        &quot;value&quot;: &quot;true&quot;
                      }
                    ]
                  }
              }
          },
          {
              &quot;type&quot;: &quot;Microsoft.Web/sites/functions&quot;,
              &quot;apiVersion&quot;: &quot;2018-11-01&quot;,
              &quot;name&quot;: &quot;[concat(variables('fetchSciHubProductURLName'), '/getproductsfromcoordinates')]&quot;,
              &quot;location&quot;: &quot;[parameters('location')]&quot;,
              &quot;dependsOn&quot;: [
                  &quot;[resourceId('Microsoft.Web/sites', variables('fetchSciHubProductURLName'))]&quot;
              ],
              &quot;properties&quot;: {
                  &quot;script_root_path_href&quot;: &quot;https://testqwe123.azurewebsites.net/admin/vfs/home/site/wwwroot/getproductsfromcoordinates/&quot;,
                  &quot;script_href&quot;: &quot;https://testqwe123.azurewebsites.net/admin/vfs/home/site/wwwroot/bin/DemoThirdPartyDataDownload.AzFunction.dll&quot;,
                  &quot;config_href&quot;: &quot;https://testqwe123.azurewebsites.net/admin/vfs/home/site/wwwroot/getproductsfromcoordinates/function.json&quot;,
                  &quot;href&quot;: &quot;https://testqwe123.azurewebsites.net/admin/functions/getproductsfromcoordinates&quot;,
                  &quot;config&quot;: {}
              }
          },
          {
              &quot;type&quot;: &quot;Microsoft.Web/sites/functions&quot;,
              &quot;apiVersion&quot;: &quot;2018-11-01&quot;,
              &quot;name&quot;: &quot;[concat(variables('fetchSciHubProductURLName'), '/UploadFilesToAzureStorage')]&quot;,
              &quot;location&quot;: &quot;[parameters('location')]&quot;,
              &quot;dependsOn&quot;: [
                  &quot;[resourceId('Microsoft.Web/sites', variables('fetchSciHubProductURLName'))]&quot;
              ],
              &quot;properties&quot;: {
                  &quot;script_root_path_href&quot;: &quot;https://testqwe123.azurewebsites.net/admin/vfs/home/site/wwwroot/UploadFilesToAzureStorage/&quot;,
                  &quot;script_href&quot;: &quot;https://testqwe123.azurewebsites.net/admin/vfs/home/site/wwwroot/bin/DemoThirdPartyDataDownload.AzFunction.dll&quot;,
                  &quot;config_href&quot;: &quot;https://testqwe123.azurewebsites.net/admin/vfs/home/site/wwwroot/UploadFilesToAzureStorage/function.json&quot;,
                  &quot;href&quot;: &quot;https://testqwe123.azurewebsites.net/admin/functions/UploadFilesToAzureStorage&quot;,
                  &quot;config&quot;: {}
              }
          }
  </code></pre>
  <p>I have problem with below types, Microsoft.Web/sites/functions
  When I check in this code, both Microsoft.Web/sites/functions fails. It throws me below error.</p>
  <pre><code>{
      &quot;Code&quot;: &quot;BadRequest&quot;,
      &quot;Message&quot;: &quot;Encountered an error (InternalServerError) from host runtime.&quot;,
      &quot;Target&quot;: null,
      &quot;Details&quot;: [
          {
              &quot;Message&quot;: &quot;Encountered an error (InternalServerError) from host runtime.&quot;
          },
          {
              &quot;Code&quot;: &quot;BadRequest&quot;
          },
          {
              &quot;ErrorEntity&quot;: {
                  &quot;Code&quot;: &quot;BadRequest&quot;,
                  &quot;Message&quot;: &quot;Encountered an error (InternalServerError) from host runtime.&quot;
              }
          }
      ],
      &quot;Innererror&quot;: null
  }
  </code></pre>
  <p>spent couple of hours to figure it out and still not finding it. Can someone help me what I am doing wrong here? Any help would be really helpful Thanks</p>