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.57k stars 390 forks source link

Support for Azure Postgres Cluster #4502

Open rebeccapowell opened 2 months ago

rebeccapowell commented 2 months ago

Background and Motivation

Adding support for Azure Cosmos DB for Postgres Cluster (Citus extension)

see https://learn.microsoft.com/en-us/azure/cosmos-db/postgresql/concepts-cluster

Proposed API

namespace Aspire.Hosting;

public static class AzurePostgresExtensions
{
+    public static IResourceBuilder<T> PublishAsAzurePostgresClusterServer<T>(this IResourceBuilder<PostgresServerResource> builder, Action<IResourceBuilder<AzurePostgresReaource>, ReaourceModuleConstruct, PostgresSqlClusterServer>? configurrReaource)
}

Usage Examples

Alternative Designs

Risks

davidfowl commented 2 months ago

I'd love to see the API request fully filled out with examples of how this API would work and how it would change the existing API. Would this be a method on CosmosDB or on PostgresServerResource? Also why is it generic?