Skip to content

Commit 8e48df8

Browse files
committed
add subscription as property to get image version
1 parent 11f6022 commit 8e48df8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/azure-cli/azure/cli/command_modules/vm/_validators.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,8 @@ def _validate_vm_create_storage_profile(cmd, namespace, for_scale_set=False):
518518
image_version_infos = _SigImageVersionList(cli_ctx=cmd.cli_ctx)(command_args={
519519
"resource_group": res['resource_group'],
520520
"gallery_name": res['name'],
521-
"gallery_image_definition": res['child_name_1']
521+
"gallery_image_definition": res['child_name_1'],
522+
"subscription": res['subscription']
522523
})
523524
image_version_infos = [x for x in image_version_infos
524525
if not x.get("publishingProfile", {}).get("excludeFromLatest", None)]
@@ -535,6 +536,7 @@ def _validate_vm_create_storage_profile(cmd, namespace, for_scale_set=False):
535536
"gallery_name": res['name'],
536537
"gallery_image_definition": res['child_name_1'],
537538
"gallery_image_version_name": res['child_name_2'],
539+
"subscription": res['subscription']
538540
})
539541
image_data_disks = image_version_info.get("storageProfile", {}).get("dataDiskImages", []) or []
540542
image_data_disks = [{'lun': disk["lun"]} for disk in image_data_disks]

0 commit comments

Comments
 (0)