Appconfiguration: Portal: Bulk Delete Configuration

Created on 19 Apr 2019  路  11Comments  路  Source: Azure/AppConfiguration

How does one delete config keys in bulk? Or clear/reset the entire config store?
I tried importing a blank file but it did not work.
Can we have a documented way to do this either via portal or REST API?

enhancement portal

Most helpful comment

Hello @crhistianramirez, thanks for bringing this to our attention. This issue is confined to only Azure Cloud Shell and we are working with them to resolve this. Meanwhile, you can install any local Azure CLI client to run the bulk delete command:

az appconfig kv delete --name [YourConfigStoreName] --key * --label *

All 11 comments

Thanks for the feedback @Abhra1992.

You can use Azure CLI (install with az extension add -n appconfig) to delete in bulk. For example, the command below clear the entire config store.

az appconfig kv delete --name [YourConfigStoreName] --key * --label *

You can use --key and --label parameters to filter a subset of key-values you want to delete.

The Azure portal currently does not provide a way to delete key-values in bulk.

Is this something planned to be in UI? e.g. Checkboxes to select what I would like to delete?

Not planned, but we could if people find it useful to have the bulk deletion in the portal too.

Yes, it is difficult to say in the early stage if this is going to be desired. I am learning how this App Configuration works so I am adding and deleting. But once I learnt/set it up all as I want then probably I might not bother about deleting too much.

However, in this case I saw in App Service that you can edit all by clicking on Advanced Edit which opens configuration in json editor, so I could do bulk updates and bulk delete there :)

So maybe it makes sense to have also here Advance Edit? :)

_E.g. my current example. I imported my json and there is an extra word in the key. I would like to delete it. With Advance Edit I could correct my keys quickly across 10 entries._

Just tried the service and find out there is no bulk delete feature. You should really consider bulk delete and bulk edit in order to make config management easier.

You should also let the user to edit all configs via json editor which is already available in webapp configuration page (advanced edit like below).

json-edit

It would be very useful to have a bulk-delete option. Having not known the CLI command before this post, I had to delete the entire store to start over.

Same situation, any kind of bulk operations would be useful like bulk delete or add a label for all records, currently, you have to add labels manually on each record or rely on import/export functionality which is not always helpful.

Thanks for the feedback @Abhra1992.

You can use Azure CLI (install with az extension add -n appconfig) to delete in bulk. For example, the command below clear the entire config store.

az appconfig kv delete --name [YourConfigStoreName] --key * --label *

You can use --key and --label parameters to filter a subset of key-values you want to delete.

The Azure portal currently does not provide a way to delete key-values in bulk.

I tried this in the azure cloud cli and I got this error

UnrecognizedArgumentError: unrecognized arguments: nginx.conf

I had to revise my command and put the * in quotes

az appconfig kv delete --name [YourConfigStoreName] --key "*"

@avanigupta is what @crhistianramirez reported expected?

Hello @crhistianramirez, thanks for bringing this to our attention. This issue is confined to only Azure Cloud Shell and we are working with them to resolve this. Meanwhile, you can install any local Azure CLI client to run the bulk delete command:

az appconfig kv delete --name [YourConfigStoreName] --key * --label *

This would be a really nice feature to have in the UI..

Was this page helpful?
0 / 5 - 0 ratings

Related issues

justinmetz picture justinmetz  路  3Comments

sslepova picture sslepova  路  4Comments

kamalsivalingam picture kamalsivalingam  路  4Comments

trevonmckay picture trevonmckay  路  5Comments

kamalsivalingam picture kamalsivalingam  路  6Comments