Azure / Azure/azure-cli

Enable prefix with profile appconfig/kvset

Open
#31,348 1 comment 0 reactions 1 assignee Claimed by @ChristineWanjau View on GitHub
act-codegen-extensibility-squad App Configuration Auto-Assign customer-reported Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

We've utilised prefixes to separate the app configs of each of our Python apps. If we need to deploy the entire configuration for just one app, then we export the dev config using a cli command like this...

`az appconfig kv export --auth-mode login --endpoint https://dev_appcs.azconfig.io --key app1/* --label * --destination file --path C:/temp/appcs-data-dev.json --format json --profile appconfig/kvset --skip-features --yes`

Then we run a script that prepares json files for import to the other environments, before running a script like this to deploy the new configuration to each environment...

`az appconfig kv import --auth-mode login --endpoint https://st1_appcs.azconfig.io --import-mode all --source file --path C:/temp/appcs-data-st1.json --format json --profile appconfig/kvset --yes`

This works fine for adding/updating configurations, but if we remove one key from dev, then the deletion will not be projected in the other environments. Leaving us with a task to delete those keys with a custom script.

If we use the --strict flag, then this would delete ALL destination configurations that don't exist within the json file. This would be a major problem for our other apps with different key prefixes.

I would like to use --strict with --prefix applied, so that only keys with the same prefix, which are not included in the json file, are deleted on the target environment.

This feature is currently not available, as per the documentation quoted below...

https://learn.microsoft.com/en-us/cli/azure/appconfig/kv?view=azure-cli-latest

![Image](https://github.com/user-attachments/assets/2a2dfcdd-c9be-47a9-9858-c321b231fa88)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.