Support wildcard tag filters on SecurityGroups
This commit is contained in:
parent
da4934fd37
commit
88fb732302
2 changed files with 16 additions and 1 deletions
|
|
@ -109,6 +109,7 @@ from .utils import (
|
|||
random_vpn_connection_id,
|
||||
random_customer_gateway_id,
|
||||
is_tag_filter,
|
||||
tag_filter_matches,
|
||||
)
|
||||
|
||||
RESOURCES_DIR = os.path.join(os.path.dirname(__file__), 'resources')
|
||||
|
|
@ -1309,7 +1310,7 @@ class SecurityGroup(TaggedEC2Resource):
|
|||
elif is_tag_filter(key):
|
||||
tag_value = self.get_filter_value(key)
|
||||
if isinstance(filter_value, list):
|
||||
return any(v in tag_value for v in filter_value)
|
||||
return tag_filter_matches(self, key, filter_value)
|
||||
return tag_value in filter_value
|
||||
else:
|
||||
attr_name = to_attr(key)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue