mirror of https://github.com/docker/docs.git
ec2: check subnet exists in vpc
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
parent
c99e4f8fe4
commit
19f5b0cb54
|
|
@ -250,7 +250,7 @@ func (d *Driver) Create() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, s := range subnets {
|
for _, s := range subnets {
|
||||||
if s.AvailabilityZone == regionZone {
|
if s.AvailabilityZone == regionZone && s.VpcId == d.VpcId {
|
||||||
subnetId = s.SubnetId
|
subnetId = s.SubnetId
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue