Skip to content

[docs] Document AzureBicepResourceScope.CreateForSubscription/CreateForTenant - #1451

Draft
aspire-repo-bot[bot] wants to merge 2 commits into
release/13.5from
docs/azure-bicep-scope-rename-37a137c709de198e
Draft

[docs] Document AzureBicepResourceScope.CreateForSubscription/CreateForTenant#1451
aspire-repo-bot[bot] wants to merge 2 commits into
release/13.5from
docs/azure-bicep-scope-rename-37a137c709de198e

Conversation

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Documents changes from microsoft/aspire#18976

@sebastienros

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

Why

PR #18976 renamed AzureBicepResourceScope.ForSubscription/ForTenant to CreateForSubscription/CreateForTenant (verb-phrase naming per API review) before these factory methods shipped. The Customize Azure resources page did not previously document Bicep deployment scoping at all, so this adds a new section covering the API using its final, shipped names.

What changed

  • src/frontend/src/content/docs/integrations/cloud/azure/customize-resources.mdx: added a new ### Set the deployment scope section under Custom Bicep templates, showing how to use AzureBicepResourceScope.CreateForSubscription(...) and AzureBicepResourceScope.CreateForTenant() to set Resource.Scope on a Bicep resource, with a C# example adapted from the shipped API and its unit test, plus a note about matching targetScope in the Bicep template.

No pages were newly created; one existing page was updated.

Generated by PR Documentation Check for #18976 · auto · 98.6 AIC · ⌖ 6.25 AIC · ⊞ 19.4K ·

…rTenant

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aspire-repo-bot aspire-repo-bot Bot added the docs-from-code Copilot initiated issue from dotnet/aspire repo label Aug 7, 2026

By default, Aspire deploys Bicep resources at the resource group scope. Some Bicep templates require a different [deployment scope](https://learn.microsoft.com/azure/azure-resource-manager/bicep/deploy-to-subscription), such as the subscription or the tenant. Set the `Scope` property on the Bicep resource using `AzureBicepResourceScope.CreateForSubscription` or `AzureBicepResourceScope.CreateForTenant`:

```csharp title="AppHost.cs"

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.

We should also provide the typescript sample, or explain why it's not supported

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.

Copilot, please address this feedback

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.

Addressed in 9ec0e8c. I updated the “Set the deployment scope” section to include C#/TypeScript tabs and added a TypeScript note explaining that AzureBicepResourceScope/Resource.Scope aren’t currently exposed in the TypeScript AppHost APIs.

@aspire-repo-bot

Copy link
Copy Markdown
Contributor Author

Frontend HTML artifact ready

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

VS Code: Open PR #1451 artifacts

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

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
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