Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Commit

Permalink
Fixing region requirement regarding euca clusters
Browse files Browse the repository at this point in the history
  • Loading branch information
jimi-c committed Aug 20, 2015
1 parent c228739 commit 9d94e55
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cloud/amazon/ec2.py
Expand Up @@ -824,7 +824,10 @@ def create_instances(module, ec2, vpc, override_count=None):

vpc_id = None
if vpc_subnet_id:
vpc_id = vpc.get_all_subnets(subnet_ids=[vpc_subnet_id])[0].vpc_id
if not vpc:
module.fail_json(msg="region must be specified")
else:
vpc_id = vpc.get_all_subnets(subnet_ids=[vpc_subnet_id])[0].vpc_id
else:
vpc_id = None

Expand Down Expand Up @@ -1281,7 +1284,7 @@ def main():
except boto.exception.NoAuthHandlerFound, e:
module.fail_json(msg = str(e))
else:
module.fail_json(msg="region must be specified")
vpc = None

tagged_instances = []

Expand Down

0 comments on commit 9d94e55

Please sign in to comment.