[docs] Document App Service delegated subnet support - #1441
Conversation
David Pine (IEvangelist)
left a comment
There was a problem hiding this comment.
Validated against microsoft/aspire#18738, its integration README, and the TypeScript fixture. The delegated subnet examples, service delegation, generated-resource scope, and outbound-only limitations are documented accurately. The four-backtick closers match this page's existing tabbed-block convention.
There was a problem hiding this comment.
Pull request overview
This PR updates the Aspire Azure integration docs to describe delegated subnet support (WithDelegatedSubnet / withDelegatedSubnet) for Azure App Service environments, and cross-links it from the Azure Virtual Network documentation.
Changes:
- Added a new “Regional virtual network integration” section to the Azure App Service hosting doc with C# and TypeScript examples using
WithDelegatedSubnet. - Added a new “Delegate subnets to compute environments” subsection to the Azure Virtual Network doc, showing
WithDelegatedSubnetusage for Azure Container Apps and Azure App Service environments.
Docs accuracy verification (source-of-truth):
- Verified against
microsoft/aspire(main@a50e553a8cc7d6f9adfcc4550f4ff7fb769dc0d4):WithDelegatedSubnet<T>(..., IResourceBuilder<AzureSubnetResource>)exists and is exported to TypeScript aswithDelegatedSubnet.- App Service delegated subnet uses
Microsoft.Web/serverFarms. - App Service provisioning sets
VirtualNetworkSubnetIdfor generated resources including the dashboard when a delegated subnet is present.
- Doc-tester (browser/serve) run: not executed in this review context (no local docs server execution available here), so rendering/link-click validation wasn’t performed.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/frontend/src/content/docs/integrations/cloud/azure/azure-virtual-network.mdx | Adds a new delegated-subnet subsection with C#/TS examples and guidance. |
| src/frontend/src/content/docs/integrations/cloud/azure/azure-app-service/azure-app-service-host.mdx | Documents App Service “regional VNet integration” via WithDelegatedSubnet, plus adds a “See also” link to the VNet doc. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ```csharp title="AppHost.cs" | ||
| var vnet = builder.AddAzureVirtualNetwork("vnet"); | ||
| var subnet = vnet.AddSubnet("compute-subnet", "10.0.0.0/24"); | ||
|
|
||
| // Azure Container Apps environment | ||
| builder.AddAzureContainerAppEnvironment("aca-env") | ||
| .WithDelegatedSubnet(subnet); | ||
|
|
||
| // -- or -- | ||
|
|
||
| // Azure App Service environment (requires ASPIREAZURE003 suppression) | ||
| #pragma warning disable ASPIREAZURE003 | ||
| builder.AddAzureAppServiceEnvironment("app-service-env") | ||
| .WithDelegatedSubnet(subnet); | ||
| #pragma warning restore ASPIREAZURE003 | ||
| ```` |
| ```typescript title="apphost.mts" | ||
| const vnet = await builder.addAzureVirtualNetwork("vnet"); | ||
| const subnet = await vnet.addSubnet("compute-subnet", "10.0.0.0/24"); | ||
|
|
||
| // Azure Container Apps environment | ||
| await builder.addAzureContainerAppEnvironment("aca-env") | ||
| .withDelegatedSubnet(subnet); | ||
|
|
||
| // -- or -- | ||
|
|
||
| // Azure App Service environment | ||
| await builder.addAzureAppServiceEnvironment("app-service-env") | ||
| .withDelegatedSubnet(subnet); | ||
| ```` |
Frontend HTML artifact readyThe latest frontend build uploaded the This comment updates automatically when a new frontend build artifact is uploaded. |
Documents changes from microsoft/aspire#18738.
@davidfowlTargeting
release/13.5based on the source PR milestone13.5.Why
PR 18738 adds regional virtual network integration for Azure App Service environments (
WithDelegatedSubnetonAzureAppServiceEnvironmentResource), addressing the App Service config gap from discussion #18734. Signals triggered:integration_readme_changed—src/Aspire.Hosting.Azure.AppService/README.mdgained a new "Configuring regional virtual network integration" section describingWithDelegatedSubnet.pr_body_has_user_facing_section— the PR body includes a "User-facing usage" section with theWithDelegatedSubnetexample.pr_body_has_cli_flag_mention— the PR body referencesdotnet test --project ...test invocations tied to the new APIs.What changed
azure-app-service-host.mdx: Added a new "Regional virtual network integration" section (before "Customize provisioning infrastructure") showing how to add theAspire.Hosting.Azure.Networkintegration, create a delegated subnet, and apply it to an App Service environment withWithDelegatedSubnet(C# and TypeScript), including theASPIREAZURE003experimental-API suppression and a note about outbound-only scope. Also added a cross-reference to Azure Virtual Network in "See also".azure-virtual-network.mdx: Added a new "Delegate subnets to compute environments" subsection under "Add private endpoints" showing that both Azure Container Apps and Azure App Service environments exposeWithDelegatedSubnet, with a combined example and a link back to the App Service doc.Both pages were updated in place; no new pages were created.