Skip to content

Commit 1c5bd69

Browse files
andirgrahamc
authored andcommitted
EC2 Backend: compare security groups as lists
Otherwise, the check would always fail.
1 parent 3505d93 commit 1c5bd69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nixops_aws/backends/ec2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ def create_instance(self, defn, zone, user_data, ebs_optimized, args):
919919
IamInstanceProfile["Name"] = defn.instance_profile
920920

921921
if defn.subnet_id != "":
922-
if defn.security_groups != [] and defn.security_groups != ["default"]:
922+
if defn.security_groups and list(defn.security_groups) != ["default"]:
923923
raise Exception(
924924
"‘deployment.ec2.securityGroups’ is incompatible with ‘deployment.ec2.subnetId’"
925925
)

0 commit comments

Comments
 (0)