Skip to content

Commit

Permalink
updated to new style of awserr
Browse files Browse the repository at this point in the history
  • Loading branch information
m-s-austin committed May 20, 2015
1 parent 428271c commit a92fe29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions builtin/providers/aws/resource_aws_s3_bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ func resourceAwsS3BucketDelete(d *schema.ResourceData, meta interface{}) error {
Bucket: aws.String(d.Id()),
})
if err != nil {
ec2err, ok := err.(aws.APIError)
if ok && ec2err.Code == "BucketNotEmpty" {
ec2err, ok := err.(awserr.Error)
if ok && ec2err.Code() == "BucketNotEmpty" {
if d.Get("force_destroy").(bool) {
// bucket may have things delete them
log.Printf("[DEBUG] S3 Bucket attempting to forceDestroy %+v", err)
Expand Down

0 comments on commit a92fe29

Please sign in to comment.