[BUG] Wrong configuration properties for Cosmos in Spring Cloud App Configuration App samples
saragluna opened this issue · 0 comments
saragluna commented
Describe the bug
This bug was found in this Azure/azure-sdk-for-java#33165. There are two samples in https://github.com/Azure-Samples/azure-spring-boot-samples/blob/main/appconfiguration/azure-spring-cloud-appconfiguration-config/azure-spring-cloud-appconfiguration-config-convert-sample/, the initial
one use KV to store the Cosmos key and other properties, and the complete
one uses App Configuration + KV to store the configurations.
The bootstrap.properties still uses COSMOS-KEY
as the property name reference, which is not correct and over-complicated in two ways.
- We use a key format like
COSMOS-KEY
in KV because Key Vault doesn't support.
in the secret name, but App Configuration can perfectly support that. - When storing configurations in the App Configuration service, there's no need to list these properties in the
bootstrap.properties
orapplication.properties
anymore.
Expected behavior
We should:
- Step 8 & 9 in convert to using App Configuration section, the key should be like
/application/spring.cloud.azure.cosmos.*
instead of/application/azure.cosmos.*
- Remove the three
spring.cloud.azure.cosmos.*
properties from the bootstrap.properties file.