AppConfiguration icon indicating copy to clipboard operation
AppConfiguration copied to clipboard

Azure App Configuration emulator

Open zhenlan opened this issue 8 months ago • 1 comments

The Azure App Configuration emulator is a tool that allows customers to run Azure App Configuration locally, enabling development and testing without needing to connect to Azure. It's perfect for projects like .NET Aspire and other local development scenarios.

zhenlan avatar Apr 03 '25 19:04 zhenlan

@zhenlan To make this even more useful, maybe link the local instance to an online instance. This would open up the option for better firewall configurations, local redundancy when external network becomes unavailable, and reduce rate usage on the online instances.

Basically an on-prem (server or PC) replicated instance.

StefanOverHaevgRZ avatar Apr 25 '25 08:04 StefanOverHaevgRZ

The repository for the emulator is now public:

https://github.com/Azure/AppConfiguration-Emulator

Stay tuned for more updates on image availability.

jimmyca15 avatar Jul 01 '25 19:07 jimmyca15

Is there going to be Aspire integration packages released soon for this? (I could not find any currently)

Is there going to be Aspire integration packages released soon for this? (I could not find any currently)

Yes we are working on it. Aspire packages with emulator support will be released after the emulator image is available. Please stay tuned

juniwang avatar Jul 07 '25 02:07 juniwang

Amazing! Great news and look forward to it!

Any rough idea when this might land (even preview :)) as we are currently planning out a project and this would really help decide a few things :)

Hi, @martinfletchersustainware. We will release the emulator by August.

zhiyuanliang-ms avatar Jul 10 '25 08:07 zhiyuanliang-ms

Will the emulator support KeyVault references also? I could not see from the emulator repository that it does.

If not, what will be the guidance for this as I would have thought nearly all users of AppConfiguration would also be using the KeyVault secret reference feature.

Also, is the Feature Flags functionality supported?

From the perspective of App Config backend service (i.e. emulator), there is no difference between normal key value and feature flag/KeyVault reference. They are all configuration settings (but with different content types). We didn't add any wizard to let you easily create a key vault reference or feature flag in the UI.

But you can actually create feature flag/KeyVault reference in a very primitive way:

Image

The configuration provider and Feature Management library will handle them.

Feature flag and key vault reference work well on my PC:

Image

Examples can be found here

zhiyuanliang-ms avatar Jul 16 '25 08:07 zhiyuanliang-ms

Amazing - I was assuming this regarding the feature flags functionality to be honest.

Still, regarding KeyVault - This would still require a KeyVault instance for the values to be resolved it seems, as the AppConfiguration client would still try to resolve via KeyVault url in the reference...

Is there any plans to 'smoke and mirror' this to work without an actual KeyVault instance within the emulator, or even plans for a KeyVault emulator?

Amazing work for this by the way - Looking forward to getting this in place!

Is there any plans to 'smoke and mirror' this to work without an actual KeyVault instance within the emulator

@zhenlan @jimmyca15 @drago-draganov So far, we don't have such a plan. But this is a good point.

plans for a KeyVault emulator

This is out of our scope. AFAIK, Azure Key Vault doesn't have emulator. But you can open an issue here, maybe the Key Vault team will implement an emulator some day.

zhiyuanliang-ms avatar Jul 16 '25 08:07 zhiyuanliang-ms

Its not a big deal really, as you can always just add the secrets as normal settings in the appconfig emulator and would still all be fine - It would just require consumers to have to explicitly write some extra integration tests just to verify KeyVault access code etc...

This would be especially true regarding the Aspire integration, and kind of goes against the patterns and practices that are being promoted for testing with Aspire via the AppHost and in-memory/emulated out of process dependencies.

The client config provider supports configuring custom secret resolver via AzureAppConfigurationKeyVaultOptions.SetSecretResolver. That can be used to completely bypass KeyVault. The config provider will invoke that secret resolver when KeyVaultReference is detected.

drago-draganov avatar Jul 16 '25 17:07 drago-draganov

Thanks - That is good to know!

Amazing guys - This helps out a lot.

Has the Aspire packages been updated to utilise this emulator yet?

@martinfletchersustainware I am working on this PR: https://github.com/dotnet/aspire/pull/10796

zhiyuanliang-ms avatar Aug 04 '25 02:08 zhiyuanliang-ms