Skip to content

Commit

Permalink
Return idenity information in the azure_rm_virtualmachine_info.py mod…
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred-sun authored and Justwmz committed Nov 4, 2024
1 parent 4180c2a commit dcfeff9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions plugins/modules/azure_rm_virtualmachine_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,22 @@
returned: always
type: str
sample: running
idenity:
description:
- The identity of the virtual machine.
type: dict
returned: always
sample: {
"principal_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"tenant_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"type": "SystemAssigned, UserAssigned",
"user_assigned_identities": {
"/subscriptions/xxx/resourceGroups/testRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test": {
"client_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"principal_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
}
}
security_profile:
description:
- Specifies the Security related profile settings for the virtual machine.
Expand Down Expand Up @@ -508,6 +524,7 @@ def serialize_vm(self, vm):
new_result['proximityPlacementGroup'] = result.get('proximity_placement_group')
new_result['zones'] = result.get('zones', None)
new_result['additional_capabilities'] = result.get('additional_capabilities')
new_result['idenity'] = result.get('identity')
new_result['capacity_reservation'] = dict()
if result.get('capacity_reservation') is not None:
new_result['capacity_reservation']['capacity_reservation_group'] = result.get('capacity_reservation').as_dict()
Expand Down

0 comments on commit dcfeff9

Please sign in to comment.