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
-
1If 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/…Mohammad Mudassir– Mohammad Mudassir2022-01-20 07:30:57 +00:00Commented Jan 20, 2022 at 7:30
-
1Connection 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.Lex Li– Lex Li2022-01-20 17:22:35 +00:00Commented Jan 20, 2022 at 17:22
-
1Ended up being a naming issue. This post had the solution.James– James2022-01-21 05:52:21 +00:00Commented Jan 21, 2022 at 5:52
Add a comment
|