-3

I'm trying to set up app settings in a Linux app service, but I'm running into an issue. I've noticed that my app setting names that contain periods are being replaced by underscores. I'm also not sure how to handle nested JSON keys like ApplicationInsights:InstrumentationKey. Can someone guide me on how to correctly format these?

  • 1
    If you want to answer your own question, please don't put the answer into the question, write an answer instead. But I'm not sure the question is on-topic here. Is it related to programming or merely about using/configuring software? Please see [tour] and [ask]. – Bodo Aug 11 '23 at 15:11
  • @Bodo Helping the community based on an issue I found and which was not addressed in the forums yet. I don't see any issue. Thanks – Bertus Viljoen Aug 14 '23 at 04:28

1 Answers1

0

In Linux app services and custom Linux containers, you need to follow certain conventions for app setting names:

Periods are replaced by underscores: If you have an app setting name containing periods, you'll notice that they are automatically replaced by underscores. For instance, MyApp.The setting should be used as MyApp_Setting in the container.

Nested JSON key structures use double underscores: When you have nested JSON keys, such as ApplicationInsights:InstrumentationKey, the : should be replaced by a double underscore (__). In this case, it should be set as ApplicationInsights__InstrumentationKey in the App Service.

To summarize, always replace periods with underscores and : with __ when you're working with app setting names in a default Linux app service or custom Linux container.

Additional Info: .Net 6 function app not getting values from Azure application settings