dotnet/docs-aspire

Document Entra ID and new Azure API pattern for Redis, PostgreSQL, and SQLServer

Opened this issue · 0 comments

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.

  1. The existing [Publish]AsAzureRedis and [Publish]AsAzurePostgresFlexibleServer methods are marked Obsolete
  2. New AddAzureRedis and AddAzurePostgresFlexibleServer methods are introduced for when you want an Azure resource.
    1. These methods configure Entra ID by default instead of using secrets.
    2. To use them in your app, you need to configure managed identity in your app. See
      1. https://github.com/Azure/Microsoft.Azure.StackExchangeRedis
      2. https://devblogs.microsoft.com/dotnet/using-postgre-sql-with-dotnet-and-entra-id/
    3. To continue using password and access key auth - new WithAccessKeyAuth/WithPasswordAuth methods can be invoked.
  3. To use a non-Azure container locally, a new RunAsContainer method can be called.

For more information: