Skip to content

[release/13.6] Fix TypeScript Bicep parameter expressions on enum Azure properties - #20767

Merged
Jose Perez Rodriguez (joperezr) merged 2 commits into
release/13.6from
backport/pr-20557-to-release/13.6
Oct 23, 2026
Merged

Jose Perez Rodriguez (joperezr) merged 2 commits into
release/13.6from
backport/pr-20557-to-release/13.6

Conversation

@aspire-repo-bot

@aspire-repo-bot aspire-repo-bot Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #20557 to release/13.6

Description

TypeScript AppHosts currently fail when configureInfrastructure assigns a bicep().parameter(...) expression to an enum-valued Azure provisioning property, such as a Storage SKU name. The generated TypeScript accepts the assignment, but publishing stops with A value of type String cannot be assigned to a BicepValue<StorageSkuName>.

Allow string-backed Bicep expressions to flow into enum-valued properties without treating string literals as enum values. This preserves type checking for literals and for incompatible expression types. No public API or additional dependencies are introduced.

User-facing usage

const storageSku = await builder.addParameter("storageSku");
const storage = await builder.addAzureStorage("storage");
await storage.configureInfrastructure(async infrastructure => {
    const account = await infrastructure.getStorageAccount();
    const sku = await infrastructure.createStorageSku();
    await sku.name.set(infrastructure.bicep().parameter(storageSku));
    await account.sku.set(sku);
});

/cc Sébastien Ros (@sebastienros)

Customer Impact

Publication failure.

Testing

Manual, deployed wit parameter.

Risk

Low

Regression?

New feature in 13.6

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20767

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20767"

@github-actions github-actions Bot added the area-integrations Issues pertaining to Aspire Integrations packages label Oct 6, 2026
@joperezr
Jose Perez Rodriguez (joperezr) merged commit c893527 into release/13.6 Oct 23, 2026
59 checks passed
@aspire-repo-bot

Copy link
Copy Markdown
Contributor Author

✅ No documentation update needed.

excluded → head_branch_is_backport, title_release_prefix, body_backport_marker (base_branch_is_release as supporting context). This is a backport to release/13.6; docs belong to the original forward PR. Triggered signals: pr_body_has_user_facing_section (PR body "User-facing usage" section).

This was referenced Oct 24, 2026
This was referenced Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-integrations Issues pertaining to Aspire Integrations packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants