Skip to content

Commit

Permalink
Filter Volumes by State
Browse files Browse the repository at this point in the history
Filter volumes based on their state, such as "in-use" or "available," using the status flag.
  • Loading branch information
Aditya Putta authored Oct 12, 2023
1 parent d7fae9d commit 6b6578d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugins/modules/ec2_vol_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
- amazon.aws.ec2_vol_info:
filters:
attachment.status: attached
# Gather information about volumes that are "in-use"
amazon.aws.ec2_vol_info:
filters:
status: in-use
# Gather information about all volumes related to an EC2 Instance
# register information to `volumes` variable
Expand Down

0 comments on commit 6b6578d

Please sign in to comment.