AppConfiguration icon indicating copy to clipboard operation
AppConfiguration copied to clipboard

Support export/import of all elements. Not only by label.

Open mmigala opened this issue 5 years ago • 13 comments

Hello,

would it be possible to add support for export/import of all elements in Azure app configuration ? Right now we have around 10 labels in our Azure app config. It's real pain to have to export them one label at a time which is really time consuming and not user friendly. The (No Label) option only exports elements with no Label. There should be option like 'All'.

image

Regards.

mmigala avatar Nov 20 '19 11:11 mmigala

Hi @mmigala, can you please help me to understand your scenario better?

  1. JSON file doesn't have a concept of the label. When you export multiple labels, there could be multiple values for the same key. How do you like the exported file look like?
  2. Do you mind to share why you need to export config to files repeatedly?

zhenlan avatar Nov 21 '19 18:11 zhenlan

Hey @zhenlan

I don't care about the format as much as the possiblity to easily export/import my Azure app configuration in a single step. If there is such a funcionality as export I don't see why I have to do it in 9-10 steps which is required if I have labels. the same goes for export to different Azure app configuration (doesn't have to be a file)

Regards

mmigala avatar Nov 22 '19 09:11 mmigala

@mmigala agreed. When exporting to another App Configuration store, we should allow exporting all labels with one click. Thanks for the suggestion.

zhenlan avatar Nov 28 '19 00:11 zhenlan

Import/export of all key-values between two App Configuration stores is supported in Azure CLI (2.0.81 or later).

az appconfig kv export --destination appconfig --name {PrimaryStore} --dest-name {SecondaryStore} --label * --preserve-labels -y

avanigupta avatar Aug 17 '20 21:08 avanigupta

It would be really nice if we could import/export to a file, with labels!

markleavesley avatar Oct 06 '21 08:10 markleavesley

Is it possible to import/export from one subscription to another using az appconfig kv export ? I see there is a --subscription field but it seems that it looks for the primary store and destionation in that subscription.

xzuttz avatar Mar 06 '22 21:03 xzuttz

It would be really nice if we could import/export to a file, with labels!

@markleavesley, please see this issue for importing/exporting to a file with all labels: https://github.com/Azure/AppConfiguration/issues/552#issuecomment-964584196

avanigupta avatar Mar 07 '22 18:03 avanigupta

Is it possible to import/export from one subscription to another using az appconfig kv export ? I see there is a --subscription field but it seems that it looks for the primary store and destionation in that subscription.

@xzuttz, yes, that's possible with a command like this:

az appconfig kv export -d appconfig --endpoint <SourceStoreEndpoint> --auth-mode login --dest-endpoint <SourceStoreEndpoint> --dest-auth-mode login

avanigupta avatar Mar 07 '22 18:03 avanigupta

It looks like this issue has been resolved. Avani has also provided details on file export capabilities. Please let us know if anything else comes up.

jimmyca15 avatar Mar 07 '22 22:03 jimmyca15

This issue is to track the portal work.

zhenlan avatar Mar 07 '22 23:03 zhenlan

This capability exists in the Azure CLI. Re-opening as work is ongoing for inclusion in the Azure Portal.

jimmyca15 avatar Mar 07 '22 23:03 jimmyca15

Thanks, works with cli!

xzuttz avatar Mar 08 '22 11:03 xzuttz

For example I have 20 labels, and all have some value XXX that I want to rename to YYY, so having export all would be nice because then I could do global find/replace and re-import all.

Would be nice to also export not by key prefix but by value "like" to minimize file size.

skironDotNet avatar Oct 03 '22 21:10 skironDotNet