Skip to content

Enable prefix with profile appconfig/kvset #31348

@h-rdcoded

Description

@h-rdcoded

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

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions