title: ARM Template: Incorrect storage endpoint for AppSettings, WEBSITE_CONTENTSHARE
body: <p>Getting error when deploying Azure function to USGov Arizona using ARM template. Template works in Azure commercial.
  Error is:</p>
  
  <pre><code>12:34:11 - 12:33:27 PM - Resource Microsoft.Web/sites/config 'SFGovAppService/appsettings' failed with message '{
  12:34:11 -   "Code": "BadRequest",
  12:34:11 -   "Message": "There was a conflict. The remote name could not be resolved: 'sftestgovstorage.file.core.windows.net'",
  12:34:11 -   "Target": null,
  12:34:11 -   "Details": [
  12:34:11 -     {
  12:34:11 -       "Message": "There was a conflict. The remote name could not be resolved: 'sftestgovstorage.file.core.windows.net'"
  12:34:11 -     },
  12:34:11 -     {
  12:34:11 -       "Code": "BadRequest"
  12:34:11 -     },
  12:34:11 -     {
  12:34:11 -       "ErrorEntity": {
  12:34:11 -         "ExtendedCode": "01020",
  12:34:11 -         "MessageTemplate": "There was a conflict. {0}",
  12:34:11 -         "Parameters": [
  12:34:11 -           "The remote name could not be resolved: 'sftestgovstorage.file.core.windows.net'"
  12:34:11 -         ],
  12:34:11 -         "Code": "BadRequest",
  12:34:11 -         "Message": "There was a conflict. The remote name could not be resolved: 'sftestgovstorage.file.core.windows.net'"
  12:34:11 -       }
  12:34:11 -     }
  12:34:11 -   ],
  12:34:11 -   "Innererror": null
  12:34:11 - }'
  </code></pre>
  
  <p>I have a successfully-deployed file service endpoint at <a href="https://sftestgovstorage.file.core.usgovcloudapi.net/" rel="nofollow noreferrer">https://sftestgovstorage.file.core.usgovcloudapi.net/</a>, within the same resource group, same location (USGov Arizona).</p>
  
  <p>Based on testing, I know that the error is being caused by the "WEBSITE_CONTENTSHARE" property in the template:  ("~" = code that I've removed to shorten this.)</p>
  
  <pre><code>{
    "comments": "Adventos SmartForce Function App Service",
    "type": "Microsoft.Web/sites",
    "kind": "functionapp",
    "name": "[parameters('appServiceName')]",
    "apiVersion": "2016-08-01",
    "location": "[resourceGroup().location]",
    "scale": null,
    "properties": {
      "enabled": true,
      "hostNameSslStates": [
  ~~~~~~~~~~~~~~
      ],
  ~~~~~~~~~~~~
    },
    "dependsOn": [
      "[resourceId('Microsoft.Web/serverfarms', parameters('appServicePlanName'))]"
    ],
    "resources": [
      {
        "name": "appsettings",
        "type": "config",
        "apiVersion": "2015-08-01",
        "dependsOn": [
          "[resourceId('Microsoft.Web/sites', parameters('appServiceName'))]"
        ],
        "properties": {
          "AzureWebJobsDashboard": "[concat('DefaultEndpointsProtocol=https;AccountName=', parameters('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountId'), providers('Microsoft.Storage', 'storageAccounts').ApiVersions[0]).keys[0].value)]",
          "AzureWebJobsStorage": "[concat('DefaultEndpointsProtocol=https;AccountName=', parameters('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountId'), providers('Microsoft.Storage', 'storageAccounts').ApiVersions[0]).keys[0].value)]",
          "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING": "[concat('DefaultEndpointsProtocol=https;AccountName=', parameters('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountId'), providers('Microsoft.Storage', 'storageAccounts').ApiVersions[0]).keys[0].value)]",
          "WEBSITE_CONTENTSHARE": "[toLower(deployment().name)]",
          "FUNCTIONS_EXTENSION_VERSION": "~1",
          "WEBSITE_NODE_DEFAULT_VERSION": "6.5.0",
  ~~~~~~~~~~~~~~~~~~
        }
      }
    ]
  },
  </code></pre>
  
  <p>I do know that AppSetting deployment works because I have been able to deploy this configuration to the government tenant using a PUT REST call (via Fiddler)</p>
  
  <p><strong>The issue/question</strong>: To me, the template deployment process in this government tenant appears to be looking for a commercial endpoint (file.core.windows.net).  Is there a way I can override/correct this?</p>