Specifying a custom VPC for AWS deployments

I need to be able to specify a custom VPC ID (ie. not the default one) for my server creations in AWS. Is there any way I can do that?

You can do this by using a manifest file, please see the example below which is a Rails and MySQL stack. Note that each server in your stack will have to have a subnet ID tied to it.

production:
    rails:
        servers:
            server:
                unique_name: app
                subnet_id: subnet-6b46ff0e
        configuration:
            vpc_id: vpc-64872001
    mysql:
        servers:
            server:
                unique_name: db
                subnet_id: subnet-6b46ff0e

If you scale up servers, how do you specify the subnet? (This is needed to go multi-az).

Is it possible to add the vpc_id value to defaults instead of declaring for each server type?

For example:


defaults: &defaults rails: &rails configuration: &rails_config vpc_id: vpc-01234567

We use yaml parser to read yml files, so it should be fine.

You must be logged in to answer this question