Skip to content

Commit

Permalink
Merge pull request #11 from jparr/isolate-with-existing
Browse files Browse the repository at this point in the history
Use filter to find existing groupId
  • Loading branch information
andrewkrug authored Jul 21, 2017
2 parents 7dba140 + 0c9bf0c commit dfab234
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions aws_ir_plugins/isolate_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@ def _create_isolation_security_group(self):
self.exists = True
security_group_result = self.client.describe_security_groups(
DryRun=self.dry_run,
GroupNames=[
self._generate_security_group_name()
]
Filters=[{
'Name': 'group-name',
'Values': [
self._generate_security_group_name(),
]
}]
)['SecurityGroups'][0]
return security_group_result['GroupId']

Expand Down

0 comments on commit dfab234

Please sign in to comment.