How to get existing ec2 instance volume size using saltstack

78 Views Asked by At

I want to create a similar (hardware level) ec2 insatnce of an existing ec2 instance using saltstack.

Tried salt'boto_ec2.get_all_volumes' but unable to get the return type as volume objects. since it is mentioned as

return_objs (bool) - Changes the return type from list of volume IDs to list of boto.ec2.volume.Volume objects returns (list) - A list of the requested values: Either the volume IDs; or, if return_objs is true, boto.ec2.volume.Volume objects.

1

There are 1 best solutions below

0
On

Yes we can get the objects by additional agrument "return_objs=True" and then get the size from the volume object

salt'boto_ec2.get_all_volumes'