Describe the bug
az snapshot create fails starting in version 2.30 when using a source that is a blob uri. It works on 2.29. It looks like the change in #19875 to determine the correct copyStart mode doesn't work for the blob uri source mode.
Specifically, it calls result = parse_proxy_resource_id(namespace.source_disk or namespace.source_snapshot) at https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/azure/cli/command_modules/vm/_validators.py#L1643-L1644, but both source_disk and source_snapshot are not set since only source_blob_uri is set.
This results in an error soon after: ERROR: 'resource_group'
To Reproduce
az snapshot create -n {name} -g {group} -l {location} --source {blobUri} --source-storage-account-id {blobStorageAccountId}
Expected behavior
Snapshot creation from a blob uri works
Environment summary
Running in Azure Pipelines. Releases started failing when the agents upgraded to az version 2.30.
Additional context
Describe the bug
az snapshot createfails starting in version 2.30 when using a source that is a blob uri. It works on 2.29. It looks like the change in #19875 to determine the correctcopyStartmode doesn't work for the blob uri source mode.Specifically, it calls
result = parse_proxy_resource_id(namespace.source_disk or namespace.source_snapshot)at https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/azure/cli/command_modules/vm/_validators.py#L1643-L1644, but bothsource_diskandsource_snapshotare not set since onlysource_blob_uriis set.This results in an error soon after:
ERROR: 'resource_group'To Reproduce
az snapshot create -n {name} -g {group} -l {location} --source {blobUri} --source-storage-account-id {blobStorageAccountId}Expected behavior
Snapshot creation from a blob uri works
Environment summary
Running in Azure Pipelines. Releases started failing when the agents upgraded to
azversion 2.30.Additional context