internal/awscloud: use AWS.TerminateInstancesEC2() from osbuild/images

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2025-08-11 13:56:57 +02:00 committed by Tomáš Hozza
parent 74d2edb772
commit e7d8431489
4 changed files with 2 additions and 18 deletions

View file

@ -154,7 +154,7 @@ func terminateOrphanedSecureInstances(a *awscloud.AWS, dryRun bool) error {
log.Printf("Cleaning up executor instances: %v", instanceIDs)
if !dryRun {
if len(instanceIDs) > 0 {
err = a.TerminateInstances(instanceIDs)
_, err = a.TerminateInstancesEC2(instanceIDs, 0)
if err != nil {
return fmt.Errorf("Unable to terminate secure instances: %w", err)
}