From b61e6d59c66d85eeb7478e98d8d0b54094cbb9c2 Mon Sep 17 00:00:00 2001 From: Sven Walter Date: Mon, 25 May 2020 16:30:25 +0200 Subject: [PATCH] fix Route53HealthCheck loop (#510) --- resources/route53-health-checks.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/route53-health-checks.go b/resources/route53-health-checks.go index ea170a61f..851d241ba 100644 --- a/resources/route53-health-checks.go +++ b/resources/route53-health-checks.go @@ -2,10 +2,11 @@ package resources import ( "fmt" + + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/route53" "github.com/rebuy-de/aws-nuke/pkg/types" - "github.com/aws/aws-sdk-go/aws" ) func init() { @@ -17,7 +18,6 @@ func ListRoute53HealthChecks(sess *session.Session) ([]Resource, error) { params := &route53.ListHealthChecksInput{} resources := make([]Resource, 0) - for { resp, err := svc.ListHealthChecks(params) if err != nil { @@ -30,7 +30,7 @@ func ListRoute53HealthChecks(sess *session.Session) ([]Resource, error) { id: check.Id, }) } - if aws.BoolValue(resp.IsTruncated) != false { + if aws.BoolValue(resp.IsTruncated) == false { break } params.Marker = resp.NextMarker