Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

EC2: Instance is created in the VPC of the Security Group / Subnet - not the VPC supplied on the command line #1568

Open

Description

Problem

When an Instance is created its is placed in the VPC associated with the Subnet and Security Group and not the VPC passed on the command line, e.g.

docker-machine -D create -d amazonec2 --amazonec2-vpc-id alvin-dockercon --amazonec2-subnet-id subnet-26df460d --amazonec2-security-group alvin-test-sg2 foo

screen shot 2015-07-22 at 3 37 13 pm
screen shot 2015-07-22 at 3 37 33 pm

Reproduce

  1. Create vpc1 and vpc2
  2. Create Security Groups
    • sg1 associated with vpc1
    • sg2 associated with vpc2
  3. Create Subnets
    • sn1 associated with vpc1
    • sn2 associated with vpc2

$ docker-machine -D create -d amazonec2 --amazonec2-vpc-id vpc1 --amazonec2-subnet-id <id of sn2> --amazonec2-security-group sg2 foo

Solution

Validate that the VPC chosen is a match for the VPC passed on the command line and either

  • WARN that these differ and which VPC was chosen
  • ERR that they do not match

Environment

uname -a
Darwin vero.local 14.4.0 Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64
docker-machine --version
docker-machine version 0.3.0 (0a251fe)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions