Open eerhardt opened 1 day ago
Yep - I think we need to do this otherwise we'll stifle reuse of some of these fundamental application building blocks. You'll end up with packages on NuGet that look like this:
MyAspireStuff.Postgres.Azure MyAspireStuff.Postgres.AWS
... only because there isn't a shared type for the Redis resources.
I'm adding it to the backlog for now. I don't think we block 9.0 for it but I think it would be nice to see in 9.x.
Background and Motivation
See https://github.com/dotnet/aspire/pull/5930#issuecomment-2381917879 for some of the context.
With
We re-designed how resources that can be hosted in either a container or a managed Azure resource (ex. PostgreSQL, Redis, SqlServer) are added to the model.
Before
After
The downside of this approach is composability of resources. Let's say I wanted to have a resource that depended on a Postgres database instance. With this change the implementor of that would need to have extensions for each cloud provider (unless they just allow any IResourceWithConnectionString).
Proposed API
Usage Examples
Alternative Designs
Risks
cc @davidfowl @mitchdenny