Skip to content
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

Is there an KeyVaultSecretManager equivalent? #615

Closed
christophwille opened this issue Dec 18, 2024 · 1 comment
Closed

Is there an KeyVaultSecretManager equivalent? #615

christophwille opened this issue Dec 18, 2024 · 1 comment

Comments

@christophwille
Copy link

To see it in action:

https://blog.fzankl.de/customize-secret-handling-with-azure-key-vault-in-aspnet#heading-how-to-customize-secret-handling

Is there a similar capability in AppConfiguration? (I see all the docs with "TestApp:Settings:*" and it kind of would be exactly what I want "Give me all keys with TestApp but then strip it off the key" - just like I can do with KeyVault)

@samsadsam
Copy link
Contributor

You can do it with this library by using AzureAppConfigurationOptions.TrimKeyPrefix. Here is a code snippet:

builder.AddAzureAppConfiguration(options =>
{
    options.Connect(add_connection_string_here)
           .Select("TestApp:Settings:*")
           .TrimKeyPrefix("TestApp:Settings:");
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants