title: Using appsettings in Azure function
body: <p>This is a follow up question to this question:</p>
  <p><a href="https://stackoverflow.com/questions/66868455/appsettings-json-and-azure-function-by-timer">appsettings.json and azure function by timer</a></p>
  <p>I want to have dynamic settings which I can change without redeploying the Azure function.</p>
  <p>The linked question referrers to a short article:
  <a href="https://medium.com/awesome-azure/azure-reading-application-settings-in-azure-functions-asp-net-core-1dea56cf67cf" rel="nofollow noreferrer">https://medium.com/awesome-azure/azure-reading-application-settings-in-azure-functions-asp-net-core-1dea56cf67cf</a></p>
  <p>I understood from the article how to handle local settings meant for debugging locally using the local.settings.json file. What I didn't understand is what I need to do to add settings when running in the cloud and how exactly to read them.</p>
  <p>So my questions are:</p>
  <ol>
  <li><p>How do I add settings to read when running in Azure (not sure from the article what is this &quot;Application Settings&quot; in the picture there)?</p>
  </li>
  <li><p>Will using <code>var value = Environment.GetEnvironmentVariable(&quot;your_key_here&quot;);</code> work for both local environment and when running in Azure?</p>
  </li>
  <li><p>How can I change one of the setting from the outside without having to redeploy the function?</p>
  </li>
  <li><p>The article I linked above shows a code that creates a config var in the run method. Do I need to add it somewhere as well? Since if the keys are in the application settings in azure or in the json file for local development, why is this code needed? Can't I just use <code>GetEnvironmentVariable</code> also in the Run method?</p>
  </li>
  </ol>