[docs] Reference Bicep helpers and their Azure SDK mappings - #1756
Conversation
Document all 32 factory exports, companion declarations, and validated Storage and Key Vault examples. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Remove cross-language proxy implementation details while preserving helper mappings and examples. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Correct the invalid options-object signatures for parameter, referenceExpression, and addBicepParameter.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Adds Aspire 13.6 documentation for Azure Bicep helpers, SDK mappings, and Storage/Key Vault examples.
Changes:
- Adds a comprehensive Bicep helper reference.
- Adds Storage and Key Vault TypeScript/C# examples.
- Adds a customization cross-link and sidebar entries.
| File | Reviewed changes |
|---|---|
src/frontend/src/content/docs/integrations/cloud/azure/bicep-helpers.mdx |
New helper reference and examples; several documented signatures require correction. |
src/frontend/src/content/docs/integrations/cloud/azure/customize-resources.mdx |
Added cross-link to the reference. |
src/frontend/config/sidebar/integrations.topics.ts |
Added integration navigation entry. |
src/frontend/config/sidebar/deployment.topics.ts |
Added deployment navigation entry. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Frontend HTML artifact readyThe latest frontend build uploaded the This comment updates automatically when a new frontend build artifact is uploaded. |
David Pine (IEvangelist)
left a comment
There was a problem hiding this comment.
Automated docs-accuracy review — PR #1756
Two-phase check: Phase A verifies every factual claim against the product source of truth; Phase B validates the rendered docs as a first-time user (blind to source) via a locally-served site + Playwright.
Summary
Phase A — source of truth
microsoft/aspire@release/13.6=43496a2a306c81c862c947b11b4f4e5494b6fe08(matches the SHA this PR pins)Azure/azure-sdk-for-net@4d32854480515e716c762be7925660bce6da251a(Azure.Provisioning 1.6.0, the SHA this PR pins)
Claims: 23 non-narrative claim groups extracted — ✅ 20 verified · 🟡 2 verified-with-nuance · ❔ 1 unverifiable · ❌ 0 contradicted.
Phase B — doc-tester: exercised 2 routes (/integrations/cloud/azure/bicep-helpers/ new, /integrations/cloud/azure/customize-resources/ edited) → 0 critical, 0 PR-attributable warnings. Language tabs sync (syncKey="aspire-lang"), all internal links + in-page anchors resolve, cross-link round-trips, no mobile overflow.
Verdict: COMMENT. No contradictions in Phase A and no critical rendering issues in Phase B. One unverifiable runtime caveat (inline) and two SDK-emission nuances are noted for author awareness only — nothing blocking.
Phase A — Claim verification
One inline comment is posted for the single unverifiable claim. Everything else verified against the two pinned SHAs; full evidence below.
✅ Verified & 🟡 verified-with-nuance claims (23 groups) — evidence
Core Aspire — microsoft/aspire@43496a2
- ✅ 32 factory methods — exactly 32 method-level
[AspireExport]onBicepValueFactoryProxy(BicepValueFactory.cs). - ✅ Literal helpers
string/integer/boolean/double/guid/uri/location/timeSpan→BicepValue<string|int|bool|double|Guid|Uri|AzureLocation|TimeSpan>(BicepValueFactory.cs:44-133);locationrequires non-empty. - ✅
parameter/referenceExpression→AsProvisioningParameter(creates/reusesProvisioningParameter;referenceExpressioncarriesisSecure) (BicepValueFactory.cs:135-172). - ✅
identifier→IdentifierExpression,isSecure:false(BicepValueFactory.cs:180-188). - ✅
resourceIdentifier→[AspireExport("resourceIdentifier")]alias ofIdentifier(ProvisionableResourceProxy)→Identifier(resource.BicepIdentifier)(BicepValueFactory.cs:196-210). - ✅ Named Bicep functions → C# counterparts:
concat→Concat,createGuid→CreateGuid,uniqueString→GetUniqueString,subscriptionResourceId→GetSubscriptionResourceId,take→Take,toLower→ToLower,toUpper→ToUpper,asString→AsString,parseJson→ParseJson,resourceGroup→GetResourceGroup,subscription→GetSubscription,tenant→GetTenant,deployment→GetDeployment— all present (BicepValueFactory.cs). - ✅
take/indexparameter unions (valuestring|BicepValue;countint|BicepValue;indexstring|int|BicepValue) —AspireUnionattrs. - ✅ General expressions → AST nodes:
function→FunctionCallExpression+IdentifierExpression,member→MemberExpression,index→IndexExpression,binary→BinaryExpression,unary→UnaryExpression,conditional→ConditionalExpression. - ✅ String builder
appendLiteral/appendValue/build→BicepStringBuilder.Append(string)/Append(BicepExpression)/Build()(BicepStringBuilderProxy.cs). - ✅ Declaration helpers
addBicepParameter(name,type,{isSecure?})/addBicepVariable(name,type)/addBicepOutput(name,type)→ProvisioningParameter/Variable/Output(ProvisioningDeclarationExtensions.cs). - ✅
ProvisioningValueType=String/Boolean/Integer/Object/Guid→string/bool/int/object/Guid; noArray/Double/TimeSpan(ProvisioningDeclarationExtensions.cs:15-21,168-179). - 🟡 Guid → Bicep
string— verified-with-nuance: backed by the code comment "CDK maps GUIDs to strings" rather than an explicit type row. - ✅ Secure restrictions: only
string/object/GUIDsecurable;boolean/integerrejected (ValidateIsSecure). - 🟡
@secure()/ string-interpolation emission — verified-with-nuance: these are SDK-emission details (how the value is rendered), correct in substance. - ✅
kind.get()/isSecure.get()+ secure-flag propagation across composition (BicepValueProxy.cs). - ✅
addBicepParameterdoes not bind an Aspire parameter (unlikebicep.parameter). - ✅
getStorageAccount()/getKeyVaultService()TS projections — polyglot TS AppHosts + Provisioning READMEs at SHA. - ✅
addAzureStorage/addAzureKeyVaultexist (api files). - ✅ TS import of
ProvisioningValueType/BinaryBicepOperator/createStringBuilderfrom./.aspire/modules/aspire.mjs— polyglot TS AppHosts + READMEs.
Azure SDK — Azure/azure-sdk-for-net@4d32854
- ✅
BinaryBicepOperator16 members + Bicep symbols (And &&,Or ||,Coalesce ??,Equal ==,EqualIgnoreCase =~,NotEqual !=,NotEqualIgnoreCase !~,Greater >,GreaterOrEqual >=,Less <,LessOrEqual <=,Add +,Subtract -,Multiply *,Divide /,Modulo %) — match exactly. - ✅
UnaryBicepOperatorNot (!value)/Negate (-value)/SuppressNull (value!)— match exactly. - ✅
doublewhole int-range → integer; otherwisejson('1.5')(BicepSyntax.cs:32-41). - ✅
timeSpanstandalone one-hour →'01:00:00'; property format may require ISO8601/numeric units (BicepTypeMapping.cs). - ✅
BicepFunction.Interpolateexists (BicepFunction.cs).
Narrative / external (noted, not blocking, not contradicted): Storage name rules (3–24 lowercase alnum), uniqueString 13-char, Key Vault retention 7–90 days, purge-protection immutable — backed by external Microsoft Learn links / documented Azure behavior.
Phase B — Doc-tester results (blind user; rendered site only)
Served locally via pnpm dev at http://localhost:4321/; browsed with Playwright (headless Edge). Scoped to the two routes touched by this PR.
Critical issues: none.
Warnings: none attributable to the PR.
Environmental only (not a doc defect, not surfaced as a finding): every dev page logs
GET /api/live/ 404,GET /api/live/stream/ 404, and[live-status] Live API not found (404). That's the live-status feature needing the static host; the PR body already calls it out.
Passed checks:
- Page title renders: "Compose Azure infrastructure with Bicep helpers | Aspire".
- Heading outline complete and logically ordered (H1 + 7 H2s + 7 H3s).
- Language tabs render as synced TypeScript/C# groups (TypeScript selected first). Clicking C# on the first group switched both groups to C# — confirms
syncKey="aspire-lang".[TS:true,C#:false]×2 → [TS:false,C#:true]×2. - 8 tables render; 8 code blocks render, none empty.
- Internal links: the only site-relative content target is
/integrations/cloud/azure/customize-resources/(trailing slash, resolves 200), present twice. - In-page anchors: 18 hash links, all resolve (0 missing).
- Cross-link round-trip: on
/customize-resources/, the new "Compose Azure infrastructure with Bicep helpers" link →/integrations/cloud/azure/bicep-helpers/navigates and lands on the correct H1. - Mobile (375×800): no page-level horizontal overflow (
scrollWidth == clientWidth == 375). - No broken images (lazy-load placeholders only).
Recommendations: none blocking — the page is well-structured and reads cleanly for a first-time visitor.
Knowledge gaps (blind-user perspective): the external Microsoft Learn API links were not fetched in Phase B (external targets are out of scope for internal link validation; the PR body states all 19 returned 200). Their correctness is covered by Phase A, not Phase B.
Automated docs-accuracy reviewer · Phase A reads product source at the pinned SHAs; Phase B is deliberately blind to source and only exercises the rendered site.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Documents changes from microsoft/aspire#19675: microsoft/aspire#19675, authored by Sébastien Ros (@sebastienros).
Scope and documentation gap
This is the explicitly requested separate follow-up, not a replacement for #1747 (integration authoring/diagnostics) or #1748 (service coverage). Neither existing PR nor its branch is modified. The release rollup #1599 is not the source PR and is untouched.
Adds a focused, user-oriented reference for
infrastructure.bicep():resourceIdentifierexport alias, with arguments, return/value semantics, underlying C# SDK counterpart or AST node, and emitted Bicep.Files
src/frontend/src/content/docs/integrations/cloud/azure/bicep-helpers.mdx.src/frontend/src/content/docs/integrations/cloud/azure/customize-resources.mdx; existing guidance and examples are preserved.src/frontend/config/sidebar/integrations.topics.tsanddeployment.topics.ts.Exact target rationale and provenance
Prepared target resolution:
candidate_source=pr_milestone,candidate_source_detail=13.6,candidate_target_branch=release/13.6,target_resolution=exact_match. The matching docs release branch exists; this is not a latest-release or main fallback.release/13.6ate20e81f100b699c4dd6adbf01a52f6fd7bad11bd.sebros/bicep-helper-reference, on the originmicrosoft/aspire.dev, not a fork.43496a2a306c81c862c947b11b4f4e5494b6fe08. Factory, value wrapper, declaration and string-builder implementations checked against this release, not 14.x main.a11eca9611073f7cf66fa87faac63c2119e87713, matching this docs branch's generated API data.dotnet9feed after the original staging darc feed returned HTTP 404. Only isolated scratch configuration changed.Official Azure SDK verification
Verified Microsoft Learn and the corresponding official SDK implementation, rather than inferring mappings from Aspire XML summaries:
double(1.5)emitsjson('1.5'), wholedouble(2)emits2, standalone one-hourTimeSpanemits'01:00:00'; property-specific formats can differ.Validation
tsc -p tsconfig.apphost.jsonagainst genuine generated release SDK code, with no SDK patches, casts, diagnostics suppression or production changes.aspire publishwith a nonsecretParameters__environment=Productioninput and generated Storage / Key Vault Bicep. Expected warning: no compute environment in these resource-only examples.pnpm test:unit:twoslash-blocksgate passed (2 tests). New proxy examples intentionally use ordinary TypeScript fences, as their operator/runtime surface is checked against genuine SDK modules rather than the site's simplified declaration bundle.git diff --checkpassed./api/live/and/api/live/stream/requests return 404 without the static host.SME attention: tested preview string-builder limitation
The exact generated 13.6.0-preview.1.26473.12 TypeScript SDK implements
BicepStringBuilderProxyImpl.build()withawait this._client.flushPendingPromises()(.aspire/modules/aspire.mts:18905-18906). InsideconfigureInfrastructure, this waits for the enclosing pending callback. The fully awaited original Storage sample consistently timed out after 120 seconds, withFlushing 2 pending promise(s)in the trace.The runnable sample now uses
concatand publishes successfully. The page preserves the underlying string-builder reference and narrowly labels this exact preview limitation; it does not attribute the problem to C#BicepStringBuilderor Bicep itself. Please reassess/remove this caveat when the generated SDK is fixed. No product fix, SDK modification, or new product issue is included.Minimal reproduction (inside a configured callback, after obtaining
bicep):Original source signal accounting
Prepared inputs require documentation and are not excluded. This user-requested helper follow-up narrows the original broad PR's remaining gap; #1747 remains the relevant authoring/diagnostics draft.
cli_command_file_changedsrc/Aspire.Cli/Commands/Sdk/SdkDumpCommand.cs: experimental capability metadata. Existing authoring draft #1747; this page documents experimental helper boundaries, not CLI behavior again.diagnostic_documentation_changeddocs/list-of-diagnostics.md: provisioning/projection diagnostics. Existing #1747; new page retainsASPIREAZUREPROVISIONING001caveat.diff_scan_skipped_due_to_missing_patchAspireProvisioningProxyGenerator.csexceeded cached patch coverage. This follow-up directly reads release source and validates actual generated package SDK instead of treating missing patch as a skip.integration_readme_changedAspire.Hosting.Azure.Provisioning/README.mdand per-service READMEs. New page adds the missing complete helper-to-SDK/Bicep mapping without duplicating general authoring prose.new_hosting_integration_project.csprojadditions. New examples explicitly name Storage/KeyVault opt-in packages; service inventory stays separate.new_package_addednew_public_typeBicepValueProxy,ProvisionableResourceProxy, export provider attribute. Reference explains value/resource handle distinctions and factory/declaration semantics; export provider authoring stays in #1747.polyglot_code_generator_changedpr_body_has_user_facing_sectiontarget_framework_changedHuman review is required before merging, especially the exact-preview string-builder caveat and exhaustive mapping tables. SME requested: Eric Erhardt (@eerhardt).