docs-aspire icon indicating copy to clipboard operation
docs-aspire copied to clipboard

[New article]: Custom domain support in .NET Aspire 9.0

Open mitchdenny opened this issue 1 year ago • 3 comments

Proposed topic or title

Configuring custom domains during deployment to Azure.

Location in table of contents.

No response

Reason for the article

We are considering merging this PR as an experimental API:

https://github.com/dotnet/aspire/pull/6275

This provides the ability to specify configure custom domains when using the new PublishAsAzureAppContainer(...) extension method for container and project resources. However the usage is a multi-step process and requires specific documentation.

The XML doc comments for the ConfigureCustomDomain method provide the background but a detailed walkthrough is required.

Article abstract

Needs to go something like this:

  1. Explain the scenario (deployment via AZD to ACA).
  2. Explain the way domain binding in ACA works (probably with links to their docs for background).
  3. Walkthrough wiring up the ConfigureCustomDomains method and parameters.
  4. Walkthrough doing the first deployment
  5. Walkthrough binding the cert to the domain.
  6. walkthrouh updating the parameter values.
  7. Walkthrough second deployment
  8. Discuss CICD considerations.

Relevant searches

No response

mitchdenny avatar Oct 17 '24 02:10 mitchdenny

Here is what is involved to go from zero to hero with custom domains:

https://www.withaspire.dev/custom-domains-with-aspire/

We should use this as the inspiration for our official docs. @IEvangelist I'm thinking about how we structure these docs. I feel like there are probably 4-5 docs that flow on from one another.

The first one would be the basics of getting ConfigureCustomDomain(...) working and deploying from a local dev box.

The second and third would cover how to hoist that deployment into GitHub Actions or AzDo Pipelines, and the fourth and fifth would be evolving that generated pipeline into a multi-environment pipeline with approval gates etc.

I think if you put it in one doc (like I did with my article above its probably too much to consume).

The other factor is that we've got aspire deploy coming in hot. In fact I was able to trigger a deployment with custom domains yesterday with @captainsafia most recent changes. The downside is that on the aspire deploy side we don't get have pipeline generation functionality like with do with AZD.

mitchdenny avatar Aug 22 '25 06:08 mitchdenny

Could you also cover certificate binding using Azure KeyVault? Not sure if it’s already supported or not.

YohanSciubukgian avatar Aug 22 '25 07:08 YohanSciubukgian

It isn't covered with ConfigureCustomDomain(...) today but we could potentially look at supporting it for BYO cert scenarios.

mitchdenny avatar Aug 25 '25 00:08 mitchdenny