dotnet / aspire

Tools, templates, and packages to accelerate building observable, production-ready apps
https://learn.microsoft.com/dotnet/aspire
MIT License
3.95k stars 486 forks source link

Consider adding Azure Private Dns Zone resolver functionality for http and non-http Service Discovery #3783

Open oising opened 7 months ago

oising commented 7 months ago

Problem:

To use private azure resources in Aspire [from outside of Azure,i.e. on-prem], it's necessary to use a VPN (unavoidable) and additions to your local hosts file (avoidable -- see below.) The latter requires elevation/local admin also.

Solution:

Implement an abstraction that can resolve non-http and http resources using the following SDK within Aspire:

https://learn.microsoft.com/en-us/dotnet/api/overview/azure/resourcemanager.dnsresolver-readme?view=azure-dotnet

oising commented 7 months ago

(hosting your own bind or other flavour of dns server in a container that spans your on prem and private vnets as a forwarder for the private zone is of course possible, but arguably more expensive and messy as a solution.)

oising commented 7 months ago

Even a component that detected privatelink usage on referenced resources and synced to your hosts file would be good enough. Setting up a local forwarder would be nice, but I don't know if the windows client supports that.