4

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?

Kai Walter
  • 3,485
  • 2
  • 32
  • 62

1 Answers1

6

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.

David Ebbo
  • 42,443
  • 8
  • 103
  • 117