azure-dev: [Issue]ERROR: prompting for value: default value of select must be an int or string
- Make sure you’ve installed the latest version using instructions in the wiki
Output from azd version
Run azd version and copy and paste the output here:
azd version 1.17.0
Describe the bug ? Enter a value for the ‘openAiLocation’ infrastructure parameter: 13. (Europe) Switzerland North (switzerlandnorth)
ERROR: prompting for value: default value of select must be an int or string When no default is provided getting the above error.
To Reproduce install azd version 1.17 for params using @allowed provide no default value.
Expected behavior When providing no default value for a param the CLI should behave as before.
Environment Information on your environment: * Bicep CLI version 0.36.1 * IDE and version :VS Code Version: 1.99.3 (Universal)
Additional context Add any other context about the problem here.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 18 (11 by maintainers)
@adrianruchti @paulyuk @spboyer
A patch (1.17.1) should be ready later today.
As a workaround, you can add
@allowed([true, false])to your bool params like:This is JUST in case you want to have it working right away.
Note: Using the
@allowed()annotation you can control which option is highlighted during the prompt. This is based on which option you add first. For example, using@allowed([true, false])would make azd to display:While doing
@allowed([false, true])would display:Or, you also use the default metadata field to control the highlighting without changing the ordering. Like:
Would display:
(Note that the default field must be
string)@vhvb1989 @rajeshkamal5050 - This is a blocking issue on SRE right now as well. Can we get reviewed asap.
Victor has released a patch for the same. The issue should now be fixed
@paulyuk @spboyer @kristenwomack
Thank you @vhvb1989!
Seems like a regression in the bicep prompting @vhvb1989 can we review/put a new fix for it and rollout a patch?