0

In aspnetcore apps we include a appsettings.{environment}.json for each configuration / environment.

Looking at deploying our first function apps - I have a testing and production stage set-up for our release pipeline.

How do I go about setting the environment and corresponding configuration file to use for a function app? Is it the same environment variable without the full IHostingEnvironment?

JDBennett
  • 1,323
  • 17
  • 45

1 Answers1

1

In-built support for appsettings.json files is unfortunately not supported in Azure functions (yet). There is a github issue that tracks this.

There are few ways to do things at present. I posted a solution in response to a similar question earlier: Azure Functions, how to have multiple .json config files

There is also a similar solution described at github: https://github.com/Azure/azure-functions-host/issues/4464#issuecomment-494367524

Turbo
  • 2,179
  • 18
  • 38