Azure / Azure/azure-functions-host

Make it possible to disable all functions in a function app except a few specified ones

Open
#9,229 9 comments 3 reactions 0 assignees View on GitHub
enhancement feature:Standalone
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

I have a c# function app that has over 30 functions.

I have the need to disable ALL functions EXCEPT one or a few specific functions that I want running.

An example of this is when I want to develop a new function in the function app, and I am running/testing the app locally. During this time I want to prevent all the other functions to fire off as it has undesired effects.

I know that there is the option to disable functions one by one in the local.settings.json file (https://learn.microsoft.com/en-us/azure/azure-functions/disable-function?tabs=portal#localsettingsjson) such as this:

`{
"IsEncrypted": false,
"Values": {
"AzureWebJobs.HttpExample.Disabled": true
}
}`

But this is not really a valid approach when there are many functions in the app (it becomes unmanageable).

**What I would LOVE to see is the following:**

- An app wide setting "DISABLE_ALL_FUNCTIONS" that disables all the functions in the app
- The possibility to then enable specific functions. We could use the [Functionname].Disabled?

It could look like this:

`{
"IsEncrypted": false,
"Values": {
"DISABLE_ALL_FUNCTIONS": true
"AzureWebJobs.HttpExample.Disabled": false,
"AzureWebJobs.QueueExample.Disabled": false
}
}`

Contributor guide

Open the contributing guide

Research direction

Start with the local.settings.json example and the linked function-disable documentation to understand the existing per-function behavior. Trace how those settings are consumed by the host, then define and test the app-wide disable setting with explicit function exceptions; done means all unspecified functions remain disabled while the listed functions run.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.