title: ##[error]undefined: ValueType 'System.Boolean' cannot be null. (ARM Template deployment with DevOps)
body: <h2>Description</h2>
  <p>I received this strange error while deploying an Azure Function using ARM Templates. I was able to isolate that specific resource as the origin of the failure. I was unable to find  information about this error in the Microsoft doc. D o you have any idea of what could be the root cause ?</p>
  <h2>Error</h2>
  <pre><code>There were errors in your deployment. Error code: DeploymentFailed.
  ##[error]At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.
  ##[error]Details:
  ##[error]undefined: ValueType 'System.Boolean' cannot be null.
  ##[error]Check out the troubleshooting guide to see if your issue is addressed: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-resource-group-deployment?view=azure-devops#troubleshooting
  ##[error]Task failed while creating or updating the template deployment.
  </code></pre>
  <h2>Template</h2>
  <p>Note that the server farm already exists in another resource group.</p>
  <pre><code>{
    // ...
    &quot;variables&quot;: {
      // ...
      &quot;serverfarms_ASE_externalid&quot;: &quot;[concat('/subscriptions/', variables('varSubscriptionId'), '/resourceGroups/ABC-123-rg/providers/Microsoft.Web/serverfarms/Medium-ASE01-Windows01')]&quot;,
      // ...
    },
    &quot;resources&quot;: [
      // ...
      {
        &quot;type&quot;: &quot;Microsoft.Web/sites&quot;,
        &quot;apiVersion&quot;: &quot;2019-08-01&quot;,
        &quot;name&quot;: &quot;[variables('functionApp_name')]&quot;,
        &quot;location&quot;: &quot;[parameters('infra').region.primaryName]&quot;,
        &quot;dependsOn&quot;: [
          &quot;[resourceId('Microsoft.Storage/storageAccounts/blobServices', variables('storageAccount_name'), 'default')]&quot;,
          &quot;[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccount_name'))]&quot;
        ],
        &quot;identity&quot;: {
          &quot;type&quot;: &quot;SystemAssigned&quot;
        },
        &quot;kind&quot;: &quot;functionapp&quot;,
        &quot;properties&quot;: {
          &quot;serverFarmId&quot;: &quot;[variables('serverfarms_ASE_externalid')]&quot;,
          &quot;siteConfig&quot;: {
            &quot;appSettings&quot;: [
              {
                &quot;name&quot;: &quot;AzureWebJobsStorage&quot;,
                &quot;value&quot;: &quot;[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccount_name'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]&quot;
              },
              {
                &quot;name&quot;: &quot;AzureWebJobsDashboard&quot;,
                &quot;value&quot;: &quot;[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccount_name'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]&quot;
              },
              {
                &quot;name&quot;: &quot;WEBSITE_CONTENTAZUREFILECONNECTIONSTRING&quot;,
                &quot;value&quot;: &quot;[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccount_name'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]&quot;
              },
              {
                &quot;name&quot;: &quot;WEBSITE_CONTENTSHARE&quot;,
                &quot;value&quot;: &quot;[toLower(variables('functionApp_name'))]&quot;
              },
              {
                &quot;name&quot;: &quot;FUNCTIONS_EXTENSION_VERSION&quot;,
                &quot;value&quot;: &quot;~3&quot;
              },
              {
                &quot;name&quot;: &quot;WEBSITE_NODE_DEFAULT_VERSION&quot;,
                &quot;value&quot;: &quot;8.11.1&quot;
              },
              {
                &quot;name&quot;: &quot;APPINSIGHTS_INSTRUMENTATIONKEY&quot;,
                &quot;value&quot;: &quot;[reference(resourceId('Microsoft.Insights/components', variables('appInsights_name')), '2014-04-01').InstrumentationKey]&quot;
              },
              {
                &quot;name&quot;: &quot;FUNCTIONS_WORKER_RUNTIME&quot;,
                &quot;value&quot;: &quot;dotnet&quot;
              },
              {
                &quot;name&quot;: &quot;AzureWebJobsSecretStorageType&quot;,
                &quot;value&quot;: &quot;files&quot;
              }
            ]
          }
        }
      }
      // ...
    ]
  }
  </code></pre>