From 92de54dcae329c096697d5dc3229dc36064d4af9 Mon Sep 17 00:00:00 2001 From: Jonathan Innis Date: Wed, 10 Apr 2024 19:53:04 -0700 Subject: [PATCH] Delete launch template with context --- pkg/providers/launchtemplate/launchtemplate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/providers/launchtemplate/launchtemplate.go b/pkg/providers/launchtemplate/launchtemplate.go index 9edfae1ed0b4..1df30313e4fe 100644 --- a/pkg/providers/launchtemplate/launchtemplate.go +++ b/pkg/providers/launchtemplate/launchtemplate.go @@ -385,7 +385,7 @@ func (p *DefaultProvider) cachedEvictedFunc(ctx context.Context) func(string, in return } launchTemplate := lt.(*ec2.LaunchTemplate) - if _, err := p.ec2api.DeleteLaunchTemplate(&ec2.DeleteLaunchTemplateInput{LaunchTemplateId: launchTemplate.LaunchTemplateId}); awserrors.IgnoreNotFound(err) != nil { + if _, err := p.ec2api.DeleteLaunchTemplateWithContext(ctx, &ec2.DeleteLaunchTemplateInput{LaunchTemplateId: launchTemplate.LaunchTemplateId}); awserrors.IgnoreNotFound(err) != nil { logging.FromContext(ctx).With("launch-template", launchTemplate.LaunchTemplateName).Errorf("failed to delete launch template, %v", err) return }