Is there a safe way to archive Azure App Services application settings?
-
I successfully deployed a fastAPI onto Azure App Services.
However, the environmental variables that I specified into the Configurations > App Settings pane got unexpectedly deleted, thus preventing my app from running correctly and I had to manually recreate the application settings from scratch.
I could save these settings onto my local computer but I am wondering if there is a better way to archive these environment variables.
-
Ideally, you would be injecting these via an
appsettings.json
, Key Vault reference or something and not manually setting these in the Configuration panel itself. In terms of archiving the actual values etc, this is probably most easily accomplished via the https://learn.microsoft.com/en-us/rest/api/appservice/web-apps . There are several CRUD operations that can GET, UPDATE, etc configurations/application settings which should be able to allow you to accomplish what you have asked here.