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
This commit is contained in:
parent
7a366c58d2
commit
8e48a5bbcb
|
@ -132,7 +132,7 @@ func dataSourceAwsS3BucketObjectRead(d *schema.ResourceData, meta interface{}) e
|
||||||
log.Printf("[DEBUG] Reading S3 object: %s", input)
|
log.Printf("[DEBUG] Reading S3 object: %s", input)
|
||||||
out, err := conn.HeadObject(&input)
|
out, err := conn.HeadObject(&input)
|
||||||
if err != nil {
|
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 {
|
if out.DeleteMarker != nil && *out.DeleteMarker == true {
|
||||||
return fmt.Errorf("Requested S3 object %q%s has been deleted",
|
return fmt.Errorf("Requested S3 object %q%s has been deleted",
|
||||||
|
|
Loading…
Reference in New Issue