From 35345c92afe143469f0ef69215fd09353b35d563 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Wed, 17 Feb 2016 13:49:37 +0000 Subject: [PATCH] fix: Return non-aws errors if bucket creation fails --- builtin/providers/aws/resource_aws_s3_bucket.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/builtin/providers/aws/resource_aws_s3_bucket.go b/builtin/providers/aws/resource_aws_s3_bucket.go index 011bda91c..d1ace0a49 100644 --- a/builtin/providers/aws/resource_aws_s3_bucket.go +++ b/builtin/providers/aws/resource_aws_s3_bucket.go @@ -219,8 +219,11 @@ func resourceAwsS3BucketCreate(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("[WARN] Error creating S3 bucket %s, retrying: %s", bucket, err) } + } + if err != nil { return resource.RetryError{Err: err} } + return nil })