From f7125fdf37da315a048aa14321ecc1e54f02b544 Mon Sep 17 00:00:00 2001 From: Patryk Zawadzki Date: Wed, 26 Feb 2014 13:39:03 +0100 Subject: [PATCH] Properly match existing security group If we don't care about `vpc_id` then neither should the code. --- cloud/ec2_group | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud/ec2_group b/cloud/ec2_group index 34d9b161244..bbbb0fc24e0 100644 --- a/cloud/ec2_group +++ b/cloud/ec2_group @@ -146,7 +146,7 @@ def main(): groups[curGroup.id] = curGroup groups[curGroup.name] = curGroup - if curGroup.name == name and curGroup.vpc_id == vpc_id: + if curGroup.name == name and (vpc_id is None or curGroup.vpc_id == vpc_id): group = curGroup # Ensure requested group is absent