Skip to content

Commit e72356f

Browse files
authored
Merge pull request #2 from rromanchuk/fix-tag-filter
Skip appending a tag value if it's not in the given filter
2 parents e19b4cf + 7cab4ee commit e72356f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

aws-ssh-config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ def generate_id(instance, tags_filter, region):
3434
if tags_filter is not None:
3535
for tag in tags_filter.split(','):
3636
for aws_tag in instance['Instances'][0].get('Tags', []):
37+
if aws_tag['Key'] != tag:
38+
continue
3739
value = aws_tag['Value']
3840
if value:
3941
if not instance_id:

0 commit comments

Comments
 (0)