This repo demonstrates a difference in how an Azure Functions app (dotnet 8, isolated worker) loads configuration from a json file.
My key observation is that configuration is not reloaded on change to a json file in a dotnet 8 isolated worker function app.
- From a terminal in the ConfigReload.API directory, run
dotnet run
to launch the api. - Execute a get request to http://localhost:5283/configreload. Observe the returned values.
- Modify the
"Foo"
value inappsettings.Development.json
and save the file. - Execute another get request to http://localhost:5283/configreload. Observe the response and notice that the values for the IOptionsMonitor and IConfiguration have changed.
- From a terminal in the ConfigReload.Function directory, run
func start
to launch the function app. - Execute a get request to http://localhost:7071/api/HttpFunction. Observe the returned values.
- Modify the
"Foo"
value inlocal.settings.json
and save the file. - Execute another get request to http://localhost:7071/api/HttpFunction. Observe the respnse and notice that the values for the IOptionsMonitor and IConfiguration have not changed.