0

I'm trying to deploy a .NET 6 web app to an Azure App Service using GitHub Actions but not sure where to put my database connection string that's currently in appsettings.json. Do I just need to add it as a connection string in the Azure portal or do I need to update the GitHub Action workflow file?

3
  • 1
    If it's a one-time thing, just add it to the configurations of the Azure app service. But if your connection string changes frequently then: I don't know if Github action provides a way or not, but you can use Azure CLI to update the connection string for an app service. I am pretty sure Github allows to run Azure CLI commands. learn.microsoft.com/en-us/cli/azure/webapp/config/… Commented Jan 20, 2022 at 7:30
  • 1
    Connection strings and other similar settings are considered secrets in most cases, so you should save them in Azure Key Vault, learn.microsoft.com/en-us/azure/app-service/…, not a clear text config file. Commented Jan 20, 2022 at 17:22
  • 1
    Ended up being a naming issue. This post had the solution. Commented Jan 21, 2022 at 5:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.