Skip to content

Commit 93e8263

Browse files
Increasing visibility of warning for custom configuration
1 parent fe1c1c5 commit 93e8263

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

articles/azure-functions/functions-dotnet-dependency-injection.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ Before you can use dependency injection, you must install the following NuGet pa
3535

3636
To register services, create a method to configure and add components to an `IFunctionsHostBuilder` instance. The Azure Functions host creates an instance of `IFunctionsHostBuilder` and passes it directly into your method.
3737

38+
> [!CAUTION]
39+
> For function apps running in the Consumption or Premium plans, modifications to configuration values used in triggers can cause scaling errors. Any changes to these properties by the `FunctionsStartup` class results in a function app startup error.
40+
>
41+
> Injection of `IConfiguration` can lead to unexpected behavior. To learn more about adding configuration sources, see [Customizing configuration sources](#customizing-configuration-sources).
42+
3843
To register the method, add the `FunctionsStartup` assembly attribute that specifies the type name used during startup.
3944

4045
```csharp
@@ -276,9 +281,6 @@ To access user secrets values in your function app code, use `IConfiguration` or
276281

277282
## Customizing configuration sources
278283

279-
> [!NOTE]
280-
> Configuration source customization is available beginning in Azure Functions host versions 2.0.14192.0 and 3.0.14191.0.
281-
282284
To specify additional configuration sources, override the `ConfigureAppConfiguration` method in your function app's `StartUp` class.
283285

284286
The following sample adds configuration values from a base and an optional environment-specific app settings files.
@@ -328,9 +330,6 @@ By default, configuration files such as *appsettings.json* are not automatically
328330
</None>
329331
```
330332

331-
> [!IMPORTANT]
332-
> For function apps running in the Consumption or Premium plans, modifications to configuration values used in triggers can cause scaling errors. Any changes to these properties by the `FunctionsStartup` class results in a function app startup error.
333-
334333
## Next steps
335334

336335
For more information, see the following resources:

0 commit comments

Comments
 (0)