Repository navigation
[docs] Document WithServiceDelegation and AzureSubnetServiceDelegations - #1519
David Pine (IEvangelist) merged 4 commits into
Conversation
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR updates the Aspire docs site to document new Azure subnet delegation APIs, adding guidance for delegating subnets to arbitrary Azure services and highlighting the related helper constants in the Aspire 13.5 release notes.
Changes:
- Added a new “Delegate a subnet to any Azure service” section to the Azure Virtual Network integration docs with C#/TypeScript examples and a table of
AzureSubnetServiceDelegationsvalues. - Updated the Aspire 13.5 “What’s new” entry to mention
WithServiceDelegationdefault-name behavior and the newAzureSubnetServiceDelegationsconstants.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/frontend/src/content/docs/whats-new/aspire-13-5.mdx | Adds release-note detail describing the new subnet delegation helpers/constants. |
| src/frontend/src/content/docs/integrations/cloud/azure/azure-virtual-network.mdx | Documents delegating subnets directly via WithServiceDelegation / withServiceDelegation and lists well-known delegation constants. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot App <[email protected]>
Frontend HTML artifact readyThe latest frontend build uploaded the This comment updates automatically when a new frontend build artifact is uploaded. |
Adam Ratzman (adamint)
left a comment
There was a problem hiding this comment.
Two source-backed issues remain on the current head.
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 32c349b4-907d-42e9-aad8-2f0edc267779
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (3)
src/frontend/src/content/docs/integrations/cloud/azure/azure-virtual-network.mdx:406
- This TypeScript snippet uses
awaitwithaddAzureVirtualNetwork,addSubnet, andwithServiceDelegation, but these APIs are fluent/synchronous in the generated TypeScript surface (andawaithere suggests they’re async). Dropping theawaitimproves accuracy and keeps the snippet consistent with otherwith*examples on this page.
const vnet = await builder.addAzureVirtualNetwork("vnet");
const subnet = await vnet.addSubnet("aci-subnet", "10.0.0.0/23");
await subnet.withServiceDelegation(AzureSubnetServiceDelegations.ContainerInstances);
src/frontend/src/content/docs/integrations/cloud/azure/azure-virtual-network.mdx:410
- Similarly, the custom-name TypeScript call doesn’t need
awaitifwithServiceDelegationis fluent/synchronous; removing it avoids implying an async API.
// Or specify a custom delegation name.
await subnet.withServiceDelegation(
AzureSubnetServiceDelegations.ContainerInstances,
{ name: "aci-delegation" });
src/frontend/src/content/docs/integrations/cloud/azure/azure-virtual-network.mdx:365
- In the TypeScript example,
addSubnetreturns anAzureSubnetResource(not a Promise) in the generated typings, soawait vnet.addSubnet(...)is misleading and makes the snippet look async. Consider removing the unnecessaryawaitto match other fluent examples in this doc.
This issue also appears in the following locations of the same file:
- line 402
- line 407
const vnet = await builder.addAzureVirtualNetwork("vnet");
const acaSubnet = await vnet.addSubnet("aca-subnet", "10.0.0.0/24");
const appServiceSubnet = await vnet.addSubnet("app-service-subnet", "10.0.1.0/24");
1d662a0
into
release/13.5
Documents changes from microsoft/aspire#18728
@IEvangelistTargeting
release/13.5based on the source PR milestone13.5.Why
PR #18728 adds ergonomic fluent helpers for modeling an Azure subnet service delegation:
WithServiceDelegation(serviceName, name = null)onIResourceBuilder<AzureSubnetResource>(defaultingnametoserviceName), plus the newAzureSubnetServiceDelegationsstatic class of well-known supported service identifiers (ContainerInstances,ContainerAppEnvironments,AppServiceEnvironments,ApplicationGatewayForContainers). This public API surface was previously undocumented on the Azure Virtual Network page.What changed
integrations/cloud/azure/azure-virtual-network.mdx: Documented C# and TypeScriptWithServiceDelegationusage with explicit custom delegation names and the four well-known constants; updated the TypeScript package snippet to13.5.0; changed the compute-environment examples to use separate, non-overlapping Azure Container Apps and App Service subnets; and clarified that repeated directWithServiceDelegationcalls are last-write-wins, whileWithDelegatedSubnetallows same-service configuration but throwsInvalidOperationExceptionwhen the subnet's effective existing service differs.