ec2_vpc runnable without subnets specified?

42 views
Skip to first unread message

Niko Felger

unread,
Apr 14, 2015, 11:02:35 AM4/14/15
to ansible...@googlegroups.com
Hi there,

I've run into a small problem with the ec2_vpc module.

It looks like it should be possible to run the ec2_vpc module without specifying subnets. This useful e.g. when you want to:
- (1) first define the subnets, then
- (2) set up an instance in one of the subnets, and then 
- (3) define the VPC's route tables, routing some traffic to the instance from step 2.

For step 1, I can use ec2_vpc with subnets but no route_tables; for step 3, I can use ec2_vpc with route_tables but no subnets.

Unfortunately, the module breaks if no subnets are specified at this point: https://github.com/ansible/ansible-modules-core/blob/devel/cloud/amazon/ec2_vpc.py#L491 ("TypeError: 'NoneType' object is not iterable").

I would have expected that either this was wrapped in a "if subnets is not None:", or that subnets would be a required argument. Is this a bug or am I holding it wrong?

Thanks!

--

Niko Felger
EyeQuant, VP Product & Technology

@eyequant | http://facebook.com/eyequant | +49 30 609 899 79 0


Our mailing address is: WhiteMatter Labs GmbH | Reichenberger Str. 124,  10999 Berlin
Handelsregister: Amtsgericht Charlottenburg, HRB 162605 B | Geschäftsführer: Fabian Stelzer
Reply all
Reply to author
Forward
0 new messages