Azure / Azure/bicep

VSCode Extension - Generate Parameters File also outputs parameters with default values

Open
#7,294 3 comments 3 reactions 0 assignees View on GitHub
devdiv enhancement revisit
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

**Is your feature request related to a problem? Please describe.**
When I select the "Generate Parameters File" option for Bicep files, it only adds in parameters with no default values.

**Describe the solution you'd like**
Ideally, I would like to see a parameters file with all parameters, including ones with default values, where the default values are in the parameters file as well.

If I have the following bicep code:

```
param location string
param EnvironmentPrefix string = 'ImageFactoryV2'
```

I should get the following parameters file:

```
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"value": ""
},
"EnvironmentPrefix ": {
"value": "ImageFactoryV2"
}
}
}
```

Contributor guide

Open the contributing guide

Research direction

Start in the VSCode Extension implementation of the “Generate Parameters File” command and trace how Bicep parameters are selected and serialized. Compare the output with the requested example; done means parameters with defaults are included and their default values appear in the generated parameters file, while parameters without defaults remain represented.

Written by the indexing model from the issue text.

Assessment

Tech stack
vscode
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.