Skip to content

Commit

Permalink
providers/aws: Check error from resourceAwsRoute53RecordBuildSet and …
Browse files Browse the repository at this point in the history
…return err if set (#8399)

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

* explain the error and wrap in errwrap
  • Loading branch information
catsby authored Aug 23, 2016
1 parent f084be5 commit a86f0a8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions builtin/providers/aws/resource_aws_route53_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit a86f0a8

Please sign in to comment.