Skip to content

az snapshot create from blob uri fails with 2.30 #20228

@jkeech

Description

@jkeech

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions