docs-aspire
docs-aspire copied to clipboard
Document Entra ID and new Azure API pattern for Redis, PostgreSQL, and SQLServer
Describe the issue or suggestion
With supporting Microsoft Entra ID in Redis and PostgreSQL we needed to introduce a new API pattern for working with these resources that can be either locally in a container or as Azure managed resources.
- The existing
[Publish]AsAzureRedisand[Publish]AsAzurePostgresFlexibleServermethods are marked Obsolete - New
AddAzureRedisandAddAzurePostgresFlexibleServermethods are introduced for when you want an Azure resource.- These methods configure Entra ID by default instead of using secrets.
- To use them in your app, you need to configure managed identity in your app. See
- https://github.com/Azure/Microsoft.Azure.StackExchangeRedis
- https://devblogs.microsoft.com/dotnet/using-postgre-sql-with-dotnet-and-entra-id/
- To continue using password and access key auth - new
WithAccessKeyAuth/WithPasswordAuthmethods can be invoked.
- To use a non-Azure container locally, a new
RunAsContainermethod can be called.
For more information:
- https://github.com/dotnet/aspire/pull/5930
- https://github.com/dotnet/aspire/pull/5966
- https://github.com/dotnet/aspire/issues/5998