Fix network interface spec when requesting spot.
This commit is contained in:
parent
1da56993a2
commit
b51761ca36
@ -174,11 +174,15 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi
|
|||||||
ImageID: &s.SourceAMI,
|
ImageID: &s.SourceAMI,
|
||||||
InstanceType: &s.InstanceType,
|
InstanceType: &s.InstanceType,
|
||||||
UserData: &userData,
|
UserData: &userData,
|
||||||
SecurityGroupIDs: securityGroupIds,
|
|
||||||
IAMInstanceProfile: &ec2.IAMInstanceProfileSpecification{Name: &s.IamInstanceProfile},
|
IAMInstanceProfile: &ec2.IAMInstanceProfileSpecification{Name: &s.IamInstanceProfile},
|
||||||
SubnetID: &s.SubnetId,
|
|
||||||
NetworkInterfaces: []*ec2.InstanceNetworkInterfaceSpecification{
|
NetworkInterfaces: []*ec2.InstanceNetworkInterfaceSpecification{
|
||||||
&ec2.InstanceNetworkInterfaceSpecification{AssociatePublicIPAddress: &s.AssociatePublicIpAddress},
|
&ec2.InstanceNetworkInterfaceSpecification{
|
||||||
|
DeviceIndex: aws.Long(0),
|
||||||
|
AssociatePublicIPAddress: &s.AssociatePublicIpAddress,
|
||||||
|
SubnetID: &s.SubnetId,
|
||||||
|
Groups: securityGroupIds,
|
||||||
|
DeleteOnTermination: aws.Boolean(true),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Placement: &ec2.SpotPlacement{
|
Placement: &ec2.SpotPlacement{
|
||||||
AvailabilityZone: &availabilityZone,
|
AvailabilityZone: &availabilityZone,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user