mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 17:26:28 +00:00
aws: Honour the zone variable when creating an instance
Instances were being created in a different AZ to the one specified in the zone variable. This could lead to situations where the disks and the instance were in different AZs and would result in an error. This commit adds placement information to the API call used to create the instance. Fixes: #2388 Signed-off-by: Dave Tucker <dt@docker.com>
This commit is contained in:
parent
d2b7782419
commit
f574ada213
@ -88,6 +88,9 @@ func runAWS(args []string) {
|
||||
InstanceType: aws.String(machine),
|
||||
MinCount: aws.Int64(1),
|
||||
MaxCount: aws.Int64(1),
|
||||
Placement: &ec2.Placement{
|
||||
AvailabilityZone: aws.String(zone),
|
||||
},
|
||||
}
|
||||
runResult, err := compute.RunInstances(params)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user