providers/aws: Check error from resourceAwsRoute53RecordBuildSet and return err if set (#8399)

* providers/aws: Check error from resourceAwsRoute53RecordBuildSet and return if set

* explain the error and wrap in errwrap
This commit is contained in:
Clint 2016-08-23 12:25:09 -05:00 committed by GitHub
parent f084be5510
commit a86f0a8425
1 changed files with 4 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import (
"strings"
"time"
"github.com/hashicorp/errwrap"
"github.com/hashicorp/terraform/helper/hashcode"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/helper/schema"
@ -270,6 +271,9 @@ func resourceAwsRoute53RecordCreate(d *schema.ResourceData, meta interface{}) er
zone, *rec.Name, req)
respRaw, err := changeRoute53RecordSet(conn, req)
if err != nil {
return errwrap.Wrapf("[ERR]: Error building changeset: {{err}}", err)
}
changeInfo := respRaw.(*route53.ChangeResourceRecordSetsOutput).ChangeInfo