Skip to content

[docs] Document WithServiceDelegation and AzureSubnetServiceDelegations - #1519

Merged
David Pine (IEvangelist) merged 4 commits into
release/13.5from
docs/pr-18728-32102482810-1-15e89a5c14040893
Aug 18, 2026
Merged

David Pine (IEvangelist) merged 4 commits into
release/13.5from
docs/pr-18728-32102482810-1-15e89a5c14040893

Conversation

@aspire-repo-bot

@aspire-repo-bot aspire-repo-bot Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Documents changes from microsoft/aspire#18728

@IEvangelist

Targeting release/13.5 based on the source PR milestone 13.5.

Why

PR #18728 adds ergonomic fluent helpers for modeling an Azure subnet service delegation: WithServiceDelegation(serviceName, name = null) on IResourceBuilder<AzureSubnetResource> (defaulting name to serviceName), plus the new AzureSubnetServiceDelegations static 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 TypeScript WithServiceDelegation usage with explicit custom delegation names and the four well-known constants; updated the TypeScript package snippet to 13.5.0; changed the compute-environment examples to use separate, non-overlapping Azure Container Apps and App Service subnets; and clarified that repeated direct WithServiceDelegation calls are last-write-wins, while WithDelegatedSubnet allows same-service configuration but throws InvalidOperationException when the subnet's effective existing service differs.

Generated by PR Documentation Check · auto · 117.2 AIC · ⌖ 6.36 AIC · ⊞ 19.6K · ◷

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

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 AzureSubnetServiceDelegations values.
  • Updated the Aspire 13.5 “What’s new” entry to mention WithServiceDelegation default-name behavior and the new AzureSubnetServiceDelegations constants.

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.

@IEvangelist
David Pine (IEvangelist) marked this pull request as ready for review August 18, 2026 05:39
@IEvangelist
David Pine (IEvangelist) marked this pull request as draft August 18, 2026 05:40
@IEvangelist
David Pine (IEvangelist) marked this pull request as ready for review August 18, 2026 05:49
@aspire-repo-bot

Copy link
Copy Markdown
Contributor Author

Frontend HTML artifact ready

The latest frontend build uploaded the frontend-dist artifact for PR #1519. Use the VS Code button below to open this PR with GitHub Artifacts Explorer and browse the built HTML locally.

VS Code: Open PR #1519 artifacts

This comment updates automatically when a new frontend build artifact is uploaded.

@adamint Adam Ratzman (adamint) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Two source-backed issues remain on the current head.

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@IEvangelist
David Pine (IEvangelist) marked this pull request as draft August 18, 2026 06:10
@IEvangelist
David Pine (IEvangelist) removed their request for review August 18, 2026 06:10
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 32c349b4-907d-42e9-aad8-2f0edc267779

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

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 await with addAzureVirtualNetwork, addSubnet, and withServiceDelegation, but these APIs are fluent/synchronous in the generated TypeScript surface (and await here suggests they’re async). Dropping the await improves accuracy and keeps the snippet consistent with other with* 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 await if withServiceDelegation is 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, addSubnet returns an AzureSubnetResource (not a Promise) in the generated typings, so await vnet.addSubnet(...) is misleading and makes the snippet look async. Consider removing the unnecessary await to 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");

@IEvangelist
David Pine (IEvangelist) removed their request for review August 18, 2026 06:41
@IEvangelist
David Pine (IEvangelist) marked this pull request as ready for review August 18, 2026 07:06
@IEvangelist
David Pine (IEvangelist) marked this pull request as draft August 18, 2026 07:09
@IEvangelist
David Pine (IEvangelist) marked this pull request as ready for review August 18, 2026 07:11
@IEvangelist
David Pine (IEvangelist) merged commit 1d662a0 into release/13.5 Aug 18, 2026
13 of 17 checks passed
@IEvangelist
David Pine (IEvangelist) deleted the docs/pr-18728-32102482810-1-15e89a5c14040893 branch August 18, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-from-code Copilot initiated issue from dotnet/aspire repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants