Azure / Azure/bicep

Deployment Pane: "Generate CLI command" capability

Open
#12,574 0 comments 1 reaction 0 assignees View on GitHub
story: deploy pane
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

Once we've got a successful deployment with the Deployment Pane, it's common for the next step to be wanting to run that same deployment programmatically with a CLI tool such as AzureCLI or AzurePowershell. It's also often tricky to get escaping correct (e.g. for parameters with special chars).

The Deployment Pane already has all of the information needed to spit out the correct CLI command to run - this could be an easy quickstart for CI/CD or just local automation.

For example, starting with the following:
image

We could display a button to copy the following CLI command to the user's clipboard:

```sh
az deployment group create \
--subscription a1bfa635-f2bf-42f1-86b5-848c674fc321 \
--resource-group ant-test \
--template-file /path/to/main.bicep \
--parameters \
foo='foo val' \
bar='bar val' \
baz='baz val'
```

The user would then be able to paste this into their terminal window and replicate the deployment.

It might also make sense to show some customization options such as:
- validate/whatif commands
- single-line vs multi-line
- shell type (for escaping) e.g. bash or powershell
- full param vs short param names

Contributor guide

Open the contributing guide

Research direction

Start by locating the Deployment Pane and its existing deployment data flow; the issue names no file, test, or entry point. Done would require an agreed scope for command types, shell escaping, parameter formatting, and clipboard output, followed by validation of the generated commands.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.