dotnet / aspire

An opinionated, cloud ready stack for building observable, production ready, distributed applications in .NET
https://learn.microsoft.com/dotnet/aspire
MIT License
3.73k stars 430 forks source link

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

Open oising opened 5 months ago

oising commented 5 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 5 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 5 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.