An Azure service that is used to automate, configure, and install updates across hybrid environments.
Hello Varma,
Thank you for reaching out to the Microsoft Q&A forum.
When investigating it looks like VS Code is successfully compiling your Bicep file (you’re seeing main.json show up), but it never actually creates the main.parameters.json that the extension then tries to open. That’s why you get:
“Unable to resolve nonexistent file ‘i:\Bicep\BicepUdemy\main.parameters.json’ followed by:
“Please select the output format and which parameters to include”
Here’s how to fix it:
Use the Bicep CLI directly • Open a terminal in your project folder
• Run:
az bicep generate-params \
--file main.bicep \
--include-params all \
--outfile main.parameters.json
This will create
`main.parameters.json`
in the same folder.
You can swap all for RequiredOnly if you only want required parameters.
Or from VS Code’s command palette
• Open main.bicep
• Press Ctrl+Shift+P, type Bicep: Generate parameters file
• When prompted, pick JSON and All (or RequiredOnly)
• The extension will drop main.parameters.json next to your .bicep file
Verify versions
• Bicep CLI ≥ 0.18.4
• Azure CLI ≥ 2.47.0
• VS Code Bicep extension up to date
After that you should see main.parameters.json in your Explorer, and the errors will go away. From there you can deploy with:
az deployment group create --template-file main.bicep --parameters main.parameters.json
Let me know if any further queries - feel free to reach out!
Reference list:
• Bicep CLI “generate-params” command https://learn.microsoft.com/cli/azure/bicep?view=azure-cli-latest#generate-params
• Create a parameters file for Bicep deployments https://learn.microsoft.com/azure/azure-resource-manager/bicep/parameter-files?wt.mc_id=knowledgesearch_inproduct_azure-cxp-community-insider#generate-parameters-file
• Deploy Bicep with a parameters file (CLI example) https://learn.microsoft.com/azure/azure-resource-manager/bicep/parameter-files?wt.mc_id=knowledgesearch_inproduct_azure-cxp-community-insider#deploy-bicep-file-with-parameters-file