Skip to content

Conversation

polatengin
Copy link
Member

@polatengin polatengin commented Aug 21, 2025

Description

Fixes #10454

This PR introduces a new inline() function that provides synthetic sugar for external input prompts in Bicep parameter files. The function serves as a shorthand for externalInput('sys.cli', parameterName)

Example Usage

param foo = inline()

Design Decisions

The following usages are not supported and will result in validation errors:

Variable assignments

var bar = inline()

String interpolation

param baz = "prefix-${inline()}"
param bat = "${inline()}_${inline()}"

Parameter Name Inference

  • param foo = { key1: inline() } → uses "key1" as the CLI argument name
  • param foo = inline() → uses "foo" as the CLI argument name
  • param foo = [inline()] → uses "foo" as the CLI argument name

Checklist

Microsoft Reviewers: Open in CodeFlow

Copy link
Contributor

github-actions bot commented Aug 21, 2025

Test this change out locally with the following install scripts (Action run 18506231495)

VSCode
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-vsix.sh) --run-id 18506231495
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-vsix.ps1) } -RunId 18506231495"
Azure CLI
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-cli.sh) --run-id 18506231495
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-cli.ps1) } -RunId 18506231495"

Copy link
Contributor

github-actions bot commented Aug 21, 2025

Dotnet Test Results

    96 files   -     48      96 suites   - 48   42m 55s ⏱️ - 37m 34s
12 426 tests +     3  12 426 ✅ +     4  0 💤 ±0  0 ❌  - 1 
28 597 runs   - 14 244  28 597 ✅  - 14 243  0 💤 ±0  0 ❌  - 1 

Results for commit 7197db0. ± Comparison against base commit 6bb5d5f.

This pull request removes 1920 and adds 669 tests. Note that renamed tests count towards both.

		nestedProp1: 1
		nestedProp2: 2
		prop1: true
		prop2: false
	1
	2
	\$'")
	prop1: true
	prop2: false
…
Bicep.Cli.UnitTests.Services.ReplEnvironmentTests ‑ Expression_evaluation_succeeds
Bicep.Cli.UnitTests.Services.ReplEnvironmentTests ‑ Function_syntax_is_highlighted
Bicep.Cli.UnitTests.Services.ReplEnvironmentTests ‑ Type_syntax_is_highlighted
Bicep.Cli.UnitTests.Services.ReplEnvironmentTests ‑ Valid_function_syntax_raises_no_diagnostics
Bicep.Cli.UnitTests.Services.ReplEnvironmentTests ‑ Valid_type_syntax_raises_no_diagnostics
Bicep.Cli.UnitTests.Services.ReplEnvironmentTests ‑ Valid_var_syntax_raises_no_diagnostics
Bicep.Cli.UnitTests.Services.ReplEnvironmentTests ‑ Var_syntax_is_highlighted
Bicep.Core.IntegrationTests.AzTypesViaRegistryTests ‑ Bicep_compiler_handles_corrupted_extension_package_gracefully (\u001f�\u0008\u0000\u0000\u0000\u0000\u0000\u0000
�ӻ
�0\u0014\u0006��>E�\u0003Ĥ��Bw\u0017��\u0007��\u0011+���B@|w�A\Z\z\u0011�7d�9�������n�dP7$�a�&hl�QB��w�Ј�7���J!�����7���(s����\u0008�6/ aZQ��P1ኆ\u0011g+WK�j,ƕi�I^f`ɥ��]{1Ծ�5�\u0001����r����K�2���B��ϒ�?��\u0003\u0007�\u0012l\u0005i\u000b�\u000e�#��\u0006�̵��ҳy��y�y\u0001�O�z\u0000\u000c\u0000\u0000,"Value cannot be null. (Parameter 'source')")
Bicep.Core.IntegrationTests.AzTypesViaRegistryTests ‑ Bicep_compiler_handles_corrupted_extension_package_gracefully (\u001f�\u0008\u0000\u0000\u0000\u0000\u0000\u0000
�ӽ
� \u0010\u0007p�>�O`q�ޱ� m�\u001fĔ|�@��\u000c�\u000e	]ҤP������E�s��p��n�%�%��
\u0002����\u0000	\u0019�\u0017``H#c��}�\u0011]Ӻ:���Y?Hfܵ����hP�(m�4\u0016,�M��'kȯ�=板���Ź���PN5�}�h���}�>�\u001f@2$0)�\u0015)�\u001fӐG�H&�<����\u0013DQ\u0014Ekx\u00020�6�\u0000\u000c\u0000\u0000,"The path: index.json was not found in artifact contents")
Bicep.Core.IntegrationTests.AzTypesViaRegistryTests ‑ Bicep_compiler_handles_corrupted_extension_package_gracefully (\u001f�\u0008\u0000\u0000\u0000\u0000\u0000\u0000
�Խ
�0\u0010\u0000��>E�\u0003�I�\��Ap�"U\u0010\%؂\u0015Z��P��M\u0007qiq�`�!C� w	\u0017��u�Nt�\u0014%Q��\u0004��\u001a�y�~�q��|��J\u0001�\u0010�{��ţ�taJ\u0019�\u001f�ͱ��,	�\u0004�ArP�gJ�\u00073\u0013;wŘ�w]]�4���\�[ޤg]�S�iu���pW�m���\u0011\u0013T�¬L 
��ƣ�����	��r\u001b�N��.r\u0016���S�dY�e
�\u0005:彪\u0000\u000c\u0000\u0000,"'7' is an invalid end of a number. Expected a delimiter. Path: $.INVALID_JSON | LineNumber: 0 | BytePositionInLine: 20.")
…

♻️ This comment has been updated with latest results.

@polatengin polatengin marked this pull request as ready for review October 14, 2025 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow parameters to be omitted so they can be supplied at deploy-time

1 participant