-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate Keys with different Labels #43
Comments
Thanks for trying this out @kamalsivalingam. By default, the config provider of the App Configuration will load keys with no labels for simplicity. When labels are used, they can be loaded with the configBuilder.AddAzureAppConfiguration(options =>
{
options.Connect(configuration["connection_string"])
.Use(KeyFilter.Any, "mylabel")
}); Labels provide an extra dimension to key-values, so each key can have multiple values at the same time. It can be used to differentiate config for different environments (dev, test, ...), different microservices (app1, app2, ...), different regions and so on so forth. We also expect it will be a very typical use of labels for versioning. For example, I have config labeled with configBuilder.AddAzureAppConfiguration(options =>
{
options.Connect(configuration["connection_string"])
.Use(KeyFilter.Any, "v1")
.Use(KeyFilter.Any, "v2")
}); Please check out the Hope this helps. Please let me know if you have any other questions. |
I've added 2 keys with same name (poc-api:myvalue), one with label "Development", the other with no label. With this code :
It seems I cannot get the value for the key with label "Development", i always get the one without the label using
Code "Inspired" by |
If I add two entries with the same Key but different value and Label, I am not able to access these duplicate Keys from the .Net Core App/Azure Function.
What is the use of Label? Is this similar to Version?
If that is the case, still shouldn't all the Keys with different values still be accessible?
The text was updated successfully, but these errors were encountered: