Skip to content

Commit

Permalink
Add managed disk ID to returned facts for data disks (#682)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbr23 authored Dec 8, 2021
1 parent f65a92f commit 505caa4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plugins/modules/azure_rm_virtualmachine_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@
returned: always
type: str
sample: Standard_LRS
managed_disk_id:
description:
- Managed data disk ID.
returned: always
type: str
sample: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/Microsoft.Compute/disks/diskName
id:
description:
- Resource ID.
Expand Down Expand Up @@ -462,6 +468,7 @@ def serialize_vm(self, vm):
'name': disks[disk_index].get('name'),
'disk_size_gb': disks[disk_index].get('diskSizeGB'),
'managed_disk_type': disks[disk_index].get('managedDisk', {}).get('storageAccountType'),
'managed_disk_id': disks[disk_index].get('managedDisk', {}).get('id'),
'caching': disks[disk_index].get('caching')
})

Expand Down

0 comments on commit 505caa4

Please sign in to comment.