From 8e48a5bbcb3b5846f41652777e62254acccb5fba Mon Sep 17 00:00:00 2001 From: netjunki Date: Wed, 1 Mar 2017 15:00:47 -0800 Subject: [PATCH] provider/aws: more details on which s3 bucket had an error (#12314) * provider/aws: more details on which s3 bucket had an error * provider/aws: s3 bucket data source adjust error output --- builtin/providers/aws/data_source_aws_s3_bucket_object.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/providers/aws/data_source_aws_s3_bucket_object.go b/builtin/providers/aws/data_source_aws_s3_bucket_object.go index 609199938..2eff5e6da 100644 --- a/builtin/providers/aws/data_source_aws_s3_bucket_object.go +++ b/builtin/providers/aws/data_source_aws_s3_bucket_object.go @@ -132,7 +132,7 @@ func dataSourceAwsS3BucketObjectRead(d *schema.ResourceData, meta interface{}) e log.Printf("[DEBUG] Reading S3 object: %s", input) out, err := conn.HeadObject(&input) if err != nil { - return fmt.Errorf("Failed getting S3 object: %s", err) + return fmt.Errorf("Failed getting S3 object: %s Bucket: %q Object: %q", err, bucket, key) } if out.DeleteMarker != nil && *out.DeleteMarker == true { return fmt.Errorf("Requested S3 object %q%s has been deleted",