Skip to content

ConfigureCustomDomain Only Supports One Domain #7143

Open
@AndrewBabbitt97

Description

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

ConfigureCustomDomain when called multiple times with different domains & parameters will override the last set domain.

Expected Behavior

When called multiple times, I would expect ConfigureCustomDomain to append the domain to the domain list instead of replace the list entirely.

Steps To Reproduce

Call ConfigureCustomDomain twice on the same container app, the second call will overwrite the first:

var builder = DistributedApplication.CreateBuilder(args);

var customDomain1 = builder.AddParameter("CustomDomain1");
var certificateName1 = builder.AddParameter("CertificateName1");
var customDomain2 = builder.AddParameter("CustomDomain2");
var certificateName2 = builder.AddParameter("CertificateName2");

builder.AddProject<Sample_Web>("web")
    .WithExternalHttpEndpoints()
    .PublishAsAzureContainerApp((module, app) =>
    {
        app.ConfigureCustomDomain(customDomain1, certificateName1);

        // This doesn't work
        app.ConfigureCustomDomain(customDomain2, certificateName2);
    });

builder.Build().Run();

Exceptions (if any)

N/A

.NET Version info

.NET SDK: 9.0.102
.NET Runtime: 9.0.1
.NET Aspire: 9.0.0

Anything else?

N/A

Metadata

Assignees

No one assigned

    Labels

    area-integrationsIssues pertaining to Aspire Integrations packagesazureIssues associated specifically with scenarios tied to using Azure

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions