Add context menu option to generate snapshots for .bicepparam files - #19024
Add context menu option to generate snapshots for .bicepparam files#19024Siebe Verschaeve (verschaevesiebe) wants to merge 1 commit into
Conversation
|
The "Generate Snapshot" command currently only uses overwrite mode (creates or updates the
I chose overwrite as the default since it's the most straightforward use case for the VS Code UI. If there's a need to also support validate mode (e.g., as a separate command), I'm happy to add that. |
| tenantId: null, | ||
| subscriptionId: null, | ||
| resourceGroup: null, | ||
| location: null, | ||
| deploymentName: null, | ||
| cancellationToken: cancellationToken, | ||
| externalInputs: []); |
There was a problem hiding this comment.
I think realistically we'd need a way for someone to supply these inputs, but this would result in a complex UI experience, unless we're able to save the values somewhere.
There was a problem hiding this comment.
I think we can build a tree view for selecting scope later. It would be great if both deploy pane and the snapshot command can share the same UI.
|
Siebe Verschaeve (@verschaevesiebe) Are you still active on this PR? |
|
stephaniezyen happy to follow up, if we go with the first proposal the PR is ready i believe (needs main merged first and confirm functionality still works). What is still expected to get it merged ? I see CI is failing on docs. Thanks. |
Description
Added a context menu option to generate snapshots for
.bicepparamfiles in VS Code. Users can now right-click a Bicep parameters file and select "Generate Snapshot" to create a.snapshot.jsonfile, making the existingbicep snapshotCLI command accessible directly from the editor.Fixes #18861 (only UI, pattern needs to be checked with PG if feature is wanted, i would assume the generate button is already sufficient)
generate.snapshot.vsc.ui.mp4
Example Usage
Before: Users had to manually run
bicep snapshot <file>.bicepparamfrom the command line.After: Users can right-click any
.bicepparamfile in VS Code and select "Bicep: Generate Snapshot":Context Menu Locations:
Example Output:
Snapshot generation succeeded. Created file c:\path\to\file.snapshot.json
The generated
.snapshot.jsonfile will appear alongside the.bicepparamfile.Checklist
Microsoft Reviewers: Open in CodeFlow