fix: Return non-aws errors if bucket creation fails

This commit is contained in:
Radek Simko 2016-02-17 13:49:37 +00:00
parent bcd8306460
commit 35345c92af
1 changed files with 3 additions and 0 deletions

View File

@ -219,8 +219,11 @@ func resourceAwsS3BucketCreate(d *schema.ResourceData, meta interface{}) error {
return fmt.Errorf("[WARN] Error creating S3 bucket %s, retrying: %s", return fmt.Errorf("[WARN] Error creating S3 bucket %s, retrying: %s",
bucket, err) bucket, err)
} }
}
if err != nil {
return resource.RetryError{Err: err} return resource.RetryError{Err: err}
} }
return nil return nil
}) })