Is setting FUNCTIONS_EXTENSION_VERSION sufficient when updating Azure Function App with ARM template?

你。 提交于 2019-12-12 15:26:01

问题


When deploying the resources for my Function App with an ARM template like this

{
  "type": "Microsoft.Web/sites",
  "kind": "functionapp",
  "name": "[parameters('appNameFunctions')]",
  "apiVersion": "2015-08-01",
  "location": "West Europe",
  "tags": {},
  "properties": {
    "name": "[parameters('appNameFunctions')]",
    "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('aspNameFunctions'))]"
  },
  "resources": [
    {
      "name": "appsettings",
      "type": "config",
      "apiVersion": "2015-08-01",
      "dependsOn": [
        "[concat('Microsoft.Web/sites/', parameters('appNameFunctions'))]"
      ],
      "tags": {
        "displayName": "fnAppSettings"
      },
      "properties": {
        "AzureWebJobsStorage":"[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('storageAccountNameFunctions'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountNameFunctions')), '2015-05-01-preview').key1)]",
        "AzureWebJobsDashboard":"[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('storageAccountNameFunctions'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountNameFunctions')), '2015-05-01-preview').key1)]",
        "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING":"[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('storageAccountNameFunctions'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountNameFunctions')), '2015-05-01-preview').key1)]",
        "WEBSITE_CONTENTSHARE":"[parameters('appNameFunctions')]",
        "FUNCTIONS_EXTENSION_VERSION":"~0.8",
        "AZUREJOBS_EXTENSION_VERSION":"beta",
        "WEBSITE_NODE_DEFAULT_VERSION":"6.5.0"
      }
    }
  ],
  "dependsOn": [
    "[resourceId('Microsoft.Web/serverfarms', parameters('aspNameFunctions'))]",
    "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountNameFunctions'))]"
  ]
}

is it sufficient to just set FUNCTIONS_EXTENSION_VERSION to the desired version and App Service automatically adjusts / loads the correct runtime or is there something else that needs to be adjusted or executed?


回答1:


Yes, it is sufficient, and is exactly what the Portal does when you click the button to upgrade your app.

Another option is to set it to "latest", which means it will always use the very latest. Though the risk in doing that is to be affected by breaking changes.



来源:https://stackoverflow.com/questions/40327777/is-setting-functions-extension-version-sufficient-when-updating-azure-function-a

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!