az lab vm create does not work with --subscription option
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
**Describe the bug**
Running `az lab vm create --subscription ` always fails, while switching to that subscription via `az account set -s ` and then re-running the command works fine.
**To Reproduce**
```
$ az lab vm create --subscription $non_default_subscription -g $group --lab-name $lab --name my-vm --formula $formula --saved-secret VmPassword
Deployment failed. Correlation ID: . Artifacts from different Lab are not allowed. Use artifacts from the lab /subscriptions//resourceGroups//providers/Microsoft.DevTestLab/labs/, where the virtual machine is being created.
```
**Expected behavior**
The command should have the same behavior with `--subscription` as with `az account set`.
**Environment summary**
homebrew azure-cli v2.0.51
Contributor guide
Assessment
This issue has not been assessed yet.