Skip to content

Allow specifying a custom Dapr sidecar resource name via DaprSidecarOptions.SidecarName#1283

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-custom-sidecar-name-option
Draft

Allow specifying a custom Dapr sidecar resource name via DaprSidecarOptions.SidecarName#1283
Copilot wants to merge 2 commits intomainfrom
copilot/add-custom-sidecar-name-option

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 14, 2026

The sidecar resource name was always derived as {resourceName}-dapr, making it impossible to align the Aspire dashboard name with the Dapr app-id or any meaningful custom identifier.

Changes

  • DaprSidecarOptions – New SidecarName property; when null/whitespace, falls back to the existing {resourceName}-dapr default
  • DaprSidecarExportOptions – Added matching SidecarName field and wired it through ToDaprSidecarOptions()
  • IDistributedApplicationComponentBuilderExtensions – Extracted private WithDaprSidecarCore helper that accepts an explicit name; the options-based overload reads SidecarName before resource creation; callback-based overload unchanged

Usage

builder.AddProject<MyService>("my-service")
    .WithDaprSidecar(new DaprSidecarOptions
    {
        SidecarName = "my-custom-sidecar",
        AppId = "my-service"
    });

…r resource names

Agent-Logs-Url: https://github.com/CommunityToolkit/Aspire/sessions/a3ae8c2a-43be-4f3f-9452-69fc1bd5bf5f

Co-authored-by: FullStackChef <28607748+FullStackChef@users.noreply.github.com>
Copilot AI changed the title [WIP] Add custom sidecar resource name via DaprSidecarOptions.SidecarName Allow specifying a custom Dapr sidecar resource name via DaprSidecarOptions.SidecarName Apr 14, 2026
Copilot AI requested a review from FullStackChef April 14, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow specifying a custom sidecar resource name via DaprSidecarOptions.SidecarName

2 participants