The Microsoft guide lists 4 methods of deploying App Configurations (in my case to App Services). https://learn.microsoft.com/en-us/azure/azure-app-configuration/howto-best-practices
We currently use last method (push configuration) in combination with labels, specifically:
az appconfig kv export
This works well including for hierarchical keys, which require a double-underscore separator to represent curly braces. However, the development team are transitioning to second method, which is to transition to referencing the keys from the App Service. To do that hierarchical keys require a colon as separator.
The plan was to simply "change" (strictly, recreate) the key from: first__second to first:second. When doing this, however, I notice that the export fails and it is the presence of the colon causing the issue. The error is:
Failed to write key-values to appservice: Operation returned an invalid status 'Bad Request'
This error appears even when the separator is specified:
--seperator ":"
In answer to the question "why export values if you have decided to read the App Configuration from the App Service?" the answer is twofold:
- Because the pointer to the App Configuration store (the primary key) still needs to be "pushed".
- Because we had hoped to avoid a hard linkage between the code change and the App Config key changes, so we were effectively going to have each key represented at both first__second and first:second at the same time for a short transition period to de-link the two changes.
Does anyone know if there is a way to export keys that have a colon in them? (Or, indeed, if this is just a CLI bug and it should just work?)