Skip to content

Commit

Permalink
Add time_created to return (#1638)
Browse files Browse the repository at this point in the history
  • Loading branch information
valkiriaaquatica authored Jul 22, 2024
1 parent 72c0b1c commit d2fda00
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion plugins/modules/azure_rm_manageddisk_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@
- Tags to assign to the managed disk.
type: dict
sample: { "tag": "value" }
time_created:
description:
- The time the disk was created.
type: str
sample: "2018-01-01T11:08:15.338648900:00"
'''

from ansible_collections.azure.azcollection.plugins.module_utils.azure_rm_common import AzureRMModuleBase
Expand Down Expand Up @@ -255,7 +260,8 @@ def managed_disk_to_dict(self, managed_disk):
managed_by=managed_disk.managed_by,
max_shares=managed_disk.max_shares,
managed_by_extended=managed_disk.managed_by_extended,
zone=managed_disk.zones[0] if managed_disk.zones and len(managed_disk.zones) > 0 else ''
zone=managed_disk.zones[0] if managed_disk.zones and len(managed_disk.zones) > 0 else '',
time_created=managed_disk.time_created.isoformat() if managed_disk.time_created else None
)


Expand Down

0 comments on commit d2fda00

Please sign in to comment.