ec2_vol module filtering bug (#65960)

* Update ec2_vol.py

When `name` is specified, it ignores `zone` filter. That is you could not have same tag:Name in different zones.

* Add changelog fragment
pull/65497/head
Piotr Stawarski 5 years ago committed by Jill R
parent ad341ea4bb
commit 9a1329153e

@ -0,0 +1,2 @@
bugfixes:
- "ec2_vol - fix filtering bug"

@ -267,7 +267,7 @@ def get_volume(module, ec2):
if zone:
filters['availability_zone'] = zone
if name:
filters = {'tag:Name': name}
filters['tag:Name'] = name
if id:
volume_ids = [id]
try:

Loading…
Cancel
Save