0
votes

I have an Azure Function (App Service) that I deploy to Azure using an ARM template.

I have modified the host.json file for my App Service to extend the default timeout of the function as below:

{
    "functionTimeout": "00:10:00"
}

How can I include this change in my ARM Template so the updated host.json file is automatically deployed to Azure?

Right now, I deploy the ARM template and have to manually update the host.json file

1

1 Answers

1
votes

To the best of my knowledge host.json is only controllable as an artifact of the application that is published and its settings cannot be overwritten by anything at the ARM level. Therefore you must republish at the Azure Function level to update a host.json based setting.

Now you don't need to publish all the content of the application, you can simply publish settings. To do this with the Azure Functions command line tooling you should just be able to do:

func azure functionapp publish --publish-settings-only

NOTE: you can add an optional --overwrite-settings or -y on there to overwrite existing settings, otherwise it will prompt.