Reputation: 384
This might be a silly question.
I have an azure web app and an azure function app running. Both are written in .net
I want to debug the application in the local visual studio with the configuration values from the Azure portal.
How can I download the azure configuration for the web app service and function to use in local VS? Manually copying takes a lot of time and is error-prone.
Directly copying using advanced editing is not giving configuration in a correct format.
Upvotes: 0
Views: 598
Reputation: 8058
After a workaround on this, I found a way by exporting app service configuration to app configuration store and then exporting from there to local file.
There is an import/export option in the App configuration store for each app configuration you created.
Goto Import/export
, choose your source and target
locations and click on apply as shown:
Imported keys and values from Azure App service to app configuration first and then import from app configuration store to local file in json
format.
Retrieved key-values to local folder:
You can also use Az CLI
command to export configuration from Azure app service.
az appconfig kv export --name <Appconfiguration> --appservice-account <appservice> -d file --path "C:\temp\filename.json" --format json
Alternatively, You can read configuration from the App configuration store by using builder configuration code as detailed in MSDoc.
Upvotes: 0