Skip to content

Add Azure Front Door hosting integration#16137

Merged
eerhardt merged 14 commits into
microsoft:mainfrom
eerhardt:AzureFrontDoor
Apr 20, 2026
Merged

Add Azure Front Door hosting integration#16137
eerhardt merged 14 commits into
microsoft:mainfrom
eerhardt:AzureFrontDoor

Conversation

@eerhardt

@eerhardt eerhardt commented Apr 14, 2026

Copy link
Copy Markdown
Member

Description

Add Aspire.Hosting.Azure.FrontDoor, a new hosting integration that provisions Azure Front Door (Standard SKU) via Azure.Provisioning.Cdn. The integration generates bicep for a CDN profile, endpoint, origin group, origins, and a default route.

API:
builder.AddAzureFrontDoor("frontdoor")
.WithOrigin(api.GetEndpoint("https"));

WithOrigin accepts an IResourceWithEndpoints and extracts the host property so that the generated bicep receives the hostname (not the full URL).

  • New project: src/Aspire.Hosting.Azure.FrontDoor
  • Unit tests with Verify bicep snapshots
  • Deployment E2E test (App Service + Front Door)

Fixes #2497

Here's an example of using it for aspire.dev: https://github.com/microsoft/aspire.dev/compare/eerhardt/UseFrontDoor

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
  • Does the change make any security assumptions or guarantees?
    • No
  • Does the change require an update in our Aspire docs?

@github-actions

github-actions Bot commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16137

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16137"

@eerhardt

Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16137...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

eerhardt and others added 2 commits April 15, 2026 18:01
Add Aspire.Hosting.Azure.FrontDoor, a new hosting integration that provisions
Azure Front Door (Standard SKU) via Azure.Provisioning.Cdn. The integration
generates bicep for a CDN profile, endpoint, origin group, origins, and a
default route with HTTPS redirect and compression.

API:
  builder.AddAzureFrontDoor("frontdoor")
      .WithOrigin(api.GetEndpoint("https"));

WithOrigin accepts an EndpointReference and extracts the host property so
that the generated bicep receives the hostname (not the full URL).

- New project: src/Aspire.Hosting.Azure.FrontDoor
- Unit tests with Verify bicep snapshots
- Deployment E2E test (App Service + Front Door)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@eerhardt

Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16137...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

eerhardt and others added 3 commits April 15, 2026 18:07
Strip properties that match Azure ARM defaults: health probes, load balancing, cache configuration, enabledState, port/priority/weight on origins, patternsToMatch/supportedProtocols on routes. Keep only required properties and intentional security choices (HTTPS-only forwarding, HTTPS redirect).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The webfrontend (React/Node) resource was not getting a compute environment from App Service. Switching to Azure Container Apps which handles all resource types.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@eerhardt

Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16137...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@github-actions
github-actions Bot temporarily deployed to deployment-testing April 16, 2026 02:07 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 16, 2026 02:07 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 16, 2026 02:07 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 16, 2026 02:07 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 16, 2026 02:07 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 16, 2026 02:07 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 16, 2026 02:07 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 16, 2026 02:07 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 16, 2026 02:07 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 16, 2026 02:07 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 16, 2026 02:07 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 16, 2026 02:07 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 16, 2026 02:07 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 16, 2026 02:07 Inactive
@github-actions
github-actions Bot had a problem deploying to deployment-testing April 16, 2026 02:07 Failure
@github-actions
github-actions Bot temporarily deployed to deployment-testing April 16, 2026 02:07 Inactive
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16137...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@eerhardt

Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16137...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@eerhardt

Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16137...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Aspire hosting integration for provisioning Azure Front Door (Standard) using Azure.Provisioning.Cdn, along with unit/snapshot tests and an end-to-end deployment test to validate the scenario.

Changes:

  • Introduces new Aspire.Hosting.Azure.FrontDoor project with AddAzureFrontDoor(...) + WithOrigin(...) APIs and generated Bicep infrastructure.
  • Adds unit tests with verified Bicep snapshots for single/multiple origins and probe-path behavior.
  • Adds an E2E deployment test that creates a template app, adds hosting packages, deploys, and verifies ACA + Front Door endpoints.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureFrontDoorTests.AddAzureFrontDoorWithMultipleOriginsGeneratesBicep.verified.bicep New verified Bicep snapshot for multiple-origins Front Door output.
tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureFrontDoorTests.AddAzureFrontDoorWithAppServiceGeneratesBicep.verified.bicep New verified Bicep snapshot for the single-origin scenario.
tests/Aspire.Hosting.Azure.Tests/AzureFrontDoorTests.cs New unit tests validating annotations, outputs, probe-path selection, and Bicep generation.
tests/Aspire.Hosting.Azure.Tests/Aspire.Hosting.Azure.Tests.csproj Adds test-time project reference to the new Front Door hosting project.
tests/Aspire.Deployment.EndToEnd.Tests/FrontDoorDeploymentTests.cs Adds E2E deployment validation for an ACA + Front Door scenario.
src/Aspire.Hosting.Azure.FrontDoor/README.md New hosting integration README for Azure Front Door.
src/Aspire.Hosting.Azure.FrontDoor/AzureFrontDoorResource.cs Defines the Front Door resource and exposes endpoint URL output references.
src/Aspire.Hosting.Azure.FrontDoor/AzureFrontDoorOriginAnnotation.cs Internal annotation used to track configured origins.
src/Aspire.Hosting.Azure.FrontDoor/AzureFrontDoorExtensions.cs Implements AddAzureFrontDoor/WithOrigin and the underlying provisioning model generation.
src/Aspire.Hosting.Azure.FrontDoor/Aspire.Hosting.Azure.FrontDoor.csproj New package project with Azure.Provisioning.Cdn dependency and test visibility.
Directory.Packages.props Adds central package version for Azure.Provisioning.Cdn.
Aspire.slnx Includes the new project in the solution.

Comment thread src/Aspire.Hosting.Azure.FrontDoor/AzureFrontDoorExtensions.cs
Comment thread src/Aspire.Hosting.Azure.FrontDoor/AzureFrontDoorExtensions.cs
Comment thread src/Aspire.Hosting.Azure.FrontDoor/AzureFrontDoorExtensions.cs Outdated
Comment thread src/Aspire.Hosting.Azure.FrontDoor/AzureFrontDoorExtensions.cs
Comment thread src/Aspire.Hosting.Azure.FrontDoor/AzureFrontDoorExtensions.cs Outdated
Comment thread src/Aspire.Hosting.Azure.FrontDoor/AzureFrontDoorExtensions.cs
Comment thread src/Aspire.Hosting.Azure.FrontDoor/AzureFrontDoorExtensions.cs
Comment thread tests/Aspire.Hosting.Azure.Tests/AzureFrontDoorTests.cs Outdated
Comment thread src/Aspire.Hosting.Azure.FrontDoor/README.md Outdated
Comment thread src/Aspire.Hosting.Azure.FrontDoor/Aspire.Hosting.Azure.FrontDoor.csproj Outdated
Comment thread src/Aspire.Hosting.Azure.FrontDoor/AzureFrontDoorExtensions.cs Outdated
Comment thread src/Aspire.Hosting.Azure.FrontDoor/AzureFrontDoorExtensions.cs Outdated
Comment thread src/Aspire.Hosting.Azure.FrontDoor/README.md
Comment thread src/Aspire.Hosting.Azure.FrontDoor/README.md Outdated
Comment thread src/Aspire.Hosting.Azure.FrontDoor/AzureFrontDoorExtensions.cs Outdated
@eerhardt

Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16137...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@eerhardt

Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16137...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@github-actions

Copy link
Copy Markdown
Contributor

Deployment E2E Tests failed — 27 passed, 4 failed, 0 cancelled

View test results and recordings

View workflow run

Test Result Recording
Deployment.EndToEnd-VnetSqlServerConnectivityDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetKeyVaultInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetKeyVaultConnectivityDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaCompactNamingDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetSqlServerInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureAppConfigDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureLogAnalyticsDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureServiceBusDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureKeyVaultDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-TypeScriptVnetSqlServerInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksStarterWithRedisDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetStorageBlobConnectivityDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AuthenticationTests ✅ Passed
Deployment.EndToEnd-TypeScriptExpressDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureStorageDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-NspStorageKeyVaultDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaCustomRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureEventHubsDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaStarterDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaDeploymentErrorOutputTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaExistingRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AppServiceReactDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaManagedRedisDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureContainerRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-FrontDoorDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetStorageBlobInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksStarterDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-PythonFastApiDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AcrPurgeTaskDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AppServicePythonDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AcaCompactNamingUpgradeDeploymentTests ❌ Failed ▶️ View Recording

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Documentation Check ✅

No documentation PR is required for this change.

The microsoft/aspire.dev repository already has comprehensive documentation for the new Azure Front Door hosting integration at integrations/cloud/azure/azure-front-door, covering:

  • NuGet package installation (Aspire.Hosting.Azure.FrontDoor)
  • AddAzureFrontDoor and WithOrigin API usage
  • Multiple origins scenario
  • Health probes behavior
  • Generated Bicep example
  • Infrastructure customization via ConfigureInfrastructure

The existing docs on the release/13.3 branch already cover everything introduced by this PR.

Generated by PR Documentation Check · ● 348.3K ·

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for Azure Front Door and Azure DNS components

3 participants