provider/aws: Guard against nil change output (#10798)

This commit is contained in:
Clint 2016-12-28 10:45:07 -06:00 committed by Paul Stack
parent dd51491aa1
commit b6a54bb14f
1 changed files with 5 additions and 1 deletions

View File

@ -324,7 +324,11 @@ func deleteAllRecordsInHostedZoneId(hostedZoneId, hostedZoneName string, conn *r
resp, lastDeleteErr = deleteRoute53RecordSet(conn, req) resp, lastDeleteErr = deleteRoute53RecordSet(conn, req)
if out, ok := resp.(*route53.ChangeResourceRecordSetsOutput); ok { if out, ok := resp.(*route53.ChangeResourceRecordSetsOutput); ok {
log.Printf("[DEBUG] Waiting for change batch to become INSYNC: %#v", out) log.Printf("[DEBUG] Waiting for change batch to become INSYNC: %#v", out)
if out.ChangeInfo != nil && out.ChangeInfo.Id != nil {
lastErrorFromWaiter = waitForRoute53RecordSetToSync(conn, cleanChangeID(*out.ChangeInfo.Id)) lastErrorFromWaiter = waitForRoute53RecordSetToSync(conn, cleanChangeID(*out.ChangeInfo.Id))
} else {
log.Printf("[DEBUG] Change info was empty")
}
} else { } else {
log.Printf("[DEBUG] Unable to wait for change batch because of an error: %s", lastDeleteErr) log.Printf("[DEBUG] Unable to wait for change batch because of an error: %s", lastDeleteErr)
} }