internal/awscloud: use AWS.TerminateInstancesEC2() from osbuild/images
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
74d2edb772
commit
e7d8431489
4 changed files with 2 additions and 18 deletions
|
|
@ -271,12 +271,7 @@ func (a *AWS) terminatePreviousSI(hostInstanceID string) (string, error) {
|
|||
}
|
||||
|
||||
instanceID := *descrInstancesOutput.Reservations[0].Instances[0].InstanceId
|
||||
_, err = a.ec2.TerminateInstances(
|
||||
context.Background(),
|
||||
&ec2.TerminateInstancesInput{
|
||||
InstanceIds: []string{instanceID},
|
||||
},
|
||||
)
|
||||
_, err = a.TerminateInstancesEC2([]string{instanceID}, 0)
|
||||
if err != nil {
|
||||
return instanceID, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue