AzureFrontDoorExtensions Methods
AddAzureFrontDoor(IDistributedApplicationBuilder, string)Section titled AddAzureFrontDoor(IDistributedApplicationBuilder, string)extensionIResourceBuilder<AzureFrontDoorResource>public static class AzureFrontDoorExtensions{ public static IResourceBuilder<AzureFrontDoorResource> AddAzureFrontDoor( this IDistributedApplicationBuilder builder, string name) { // ... }}Parameters
builderIDistributedApplicationBuilderThe distributed application builder.namestringThe name of the resource.Returns
IResourceBuilder<AzureFrontDoorResource>A reference to the ApplicationModel.IResourceBuilder`1 for chaining.Remarks
Azure Front Door is a global, scalable entry point that uses the Microsoft global edge network to create fast, secure, and widely scalable web applications. Use AzureFrontDoorExtensions.WithOrigin to add origins (backends) to the Front Door resource. Each origin gets its own Front Door endpoint, origin group, and route, so each backend app is independently routable via its own *.azurefd.net hostname.
For advanced scenarios (shared origin groups, path-based routing, custom routes), use AzureProvisioningResourceExtensions.ConfigureInfrastructure to customize the generated infrastructure directly.
var api = builder.AddProject<Projects.Api>("api") .WithExternalHttpEndpoints();var web = builder.AddProject<Projects.Web>("web") .WithExternalHttpEndpoints();var frontDoor = builder.AddAzureFrontDoor("frontdoor") .WithOrigin(api) .WithOrigin(web);WithOrigin(IResourceBuilder<AzureFrontDoorResource>, IResourceBuilder<T>)Section titled WithOrigin(IResourceBuilder<AzureFrontDoorResource>, IResourceBuilder<T>)extensionIResourceBuilder<AzureFrontDoorResource>*.azurefd.net hostname, its own origin group, and a default route. public static class AzureFrontDoorExtensions{ public static IResourceBuilder<AzureFrontDoorResource> WithOrigin<T>( this IResourceBuilder<AzureFrontDoorResource> builder, IResourceBuilder<T> resource) { // ... }}Parameters
builderIResourceBuilder<AzureFrontDoorResource>The Azure Front Door resource builder.resourceIResourceBuilder<T>The resource to add as an origin (e.g., a project, container, or other compute resource with endpoints).Returns
IResourceBuilder<AzureFrontDoorResource>A reference to the ApplicationModel.IResourceBuilder`1 for chaining.Remarks
var frontDoor = builder.AddAzureFrontDoor("frontdoor") .WithOrigin(api) .WithOrigin(web);