Hi Benoit,

On Fri, Jan 17, 2014 at 12:54 AM, Benoit <[email protected]> wrote:

[...]

> I'm having troubles figuring out why my Vagrantfile always spawns
> servers in a VPC on AWS while I don't seem to be specifying anything
> that "tells" it to.
>

This could be because of AWS Default VPC.

http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/default-vpc.html#detecting-platform

Can you confirm that your account supports EC2-Classic? Otherwise it
could probably be launching the instance in your Default VPC.

> How can I force EC2 over a VPC? On the other hand, how would I force-spawn a
> server in a VPC (if I wanted to)? Using a combination of
> 'private_ip_address', 'security_groups' and 'subnet_id' perhaps?

You'll need to use a combination of,

- security_groups
- subnet_id
- region
- availability_zone
- elastic_ip
- private_ip_address (is optional, but you might need it for other
  reasons)

Couple of things to note. In a simple VPC configuration, you'll need
elastic IP so your provisioners can work. Using the subnet_id, region
and availability_zone, the AWS API will figure out the correct VPC (as
long as one exists)

If you are having a slightly advanced VPC configuration, then also look
at how your route tables, network ACLs and bastian hosts are configured.

Best,
Rajiv

-- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to