Skip to content

Commit

Permalink
chore: Delete launch template with context (#6021)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis authored Apr 11, 2024
1 parent 283e7b2 commit 6439883
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/providers/launchtemplate/launchtemplate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 6439883

Please sign in to comment.