Skip to content

Update Azure Integrations docs to recommend AsExisting over AddConnectionString #3497

Open
@eerhardt

Description

@eerhardt

Describe the issue or suggestion

In each of the Azure Integration docs there is a section for Connect to an existing Azure XX account. These sections are saying that if you want to connect to an existing Azure service, use the builder.AddConnectionString("name") method. This approach doesn't work as well as using .AsExisting because:

  1. The connection string isn't typed, you don't know if it is for a KeyVault, Storage, etc.
  2. Auth to the existing service isn't established. Each app gets a new Managed Identity created, and using a connection string doesn't add roles to this managed identity. But doing .AsExisting will add the necessary role assignments.

We should update these sections to recommend using AsExisting, like we have in the Azure Overview doc.

See also dotnet/aspire#9284

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions