From d4101f94813d6a7e07d520bc4f7ec3a7f2c01d66 Mon Sep 17 00:00:00 2001 From: clint shryock Date: Fri, 16 Dec 2016 12:23:19 -0600 Subject: [PATCH] provider/aws: Guard against nil change output --- builtin/providers/aws/resource_aws_route53_zone.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_route53_zone.go b/builtin/providers/aws/resource_aws_route53_zone.go index 69f74cec6275..9faa716a127c 100644 --- a/builtin/providers/aws/resource_aws_route53_zone.go +++ b/builtin/providers/aws/resource_aws_route53_zone.go @@ -324,7 +324,11 @@ func deleteAllRecordsInHostedZoneId(hostedZoneId, hostedZoneName string, conn *r resp, lastDeleteErr = deleteRoute53RecordSet(conn, req) if out, ok := resp.(*route53.ChangeResourceRecordSetsOutput); ok { log.Printf("[DEBUG] Waiting for change batch to become INSYNC: %#v", out) - lastErrorFromWaiter = waitForRoute53RecordSetToSync(conn, cleanChangeID(*out.ChangeInfo.Id)) + if out.ChangeInfo != nil && out.ChangeInfo.Id != nil { + lastErrorFromWaiter = waitForRoute53RecordSetToSync(conn, cleanChangeID(*out.ChangeInfo.Id)) + } else { + log.Printf("[DEBUG] Change info was empty") + } } else { log.Printf("[DEBUG] Unable to wait for change batch because of an error: %s", lastDeleteErr) }