diff --git a/builtin/providers/aws/resource_aws_s3_bucket.go b/builtin/providers/aws/resource_aws_s3_bucket.go index fa802d6cf..ddeab6a19 100644 --- a/builtin/providers/aws/resource_aws_s3_bucket.go +++ b/builtin/providers/aws/resource_aws_s3_bucket.go @@ -213,7 +213,7 @@ func resourceAwsS3BucketWebsitePut(s3conn *s3.S3, d *schema.ResourceData, websit WebsiteConfiguration: websiteConfiguration, } - log.Printf("[DEBUG] S3 put bucket website: %s", putInput) + log.Printf("[DEBUG] S3 put bucket website: %#v", putInput) _, err := s3conn.PutBucketWebsite(putInput) if err != nil { @@ -227,7 +227,7 @@ func resourceAwsS3BucketWebsiteDelete(s3conn *s3.S3, d *schema.ResourceData) err bucket := d.Get("bucket").(string) deleteInput := &s3.DeleteBucketWebsiteInput{Bucket: aws.String(bucket)} - log.Printf("[DEBUG] S3 delete bucket website: %s", deleteInput) + log.Printf("[DEBUG] S3 delete bucket website: %#v", deleteInput) _, err := s3conn.DeleteBucketWebsite(deleteInput) if err != nil { diff --git a/builtin/providers/aws/resource_aws_s3_bucket_test.go b/builtin/providers/aws/resource_aws_s3_bucket_test.go index 419c530cf..e100d11d4 100644 --- a/builtin/providers/aws/resource_aws_s3_bucket_test.go +++ b/builtin/providers/aws/resource_aws_s3_bucket_test.go @@ -131,16 +131,19 @@ func testAccCheckAWSS3BucketWebsite(n string, indexDoc string, errorDoc string) } if *out.IndexDocument.Suffix != indexDoc { - return fmt.Errorf("bad: %s", out.IndexDocument) + if out.IndexDocument.Suffix != nil { + return fmt.Errorf("bad index document suffix: %s", *out.IndexDocument.Suffix) + } + return fmt.Errorf("bad index document suffix, is nil") } if v := out.ErrorDocument; v == nil { if errorDoc != "" { - return fmt.Errorf("bad: %s", out.ErrorDocument) + return fmt.Errorf("bad error doc, found nil, expected: %s", errorDoc) } } else { if *v.Key != errorDoc { - return fmt.Errorf("bad: %s", out.ErrorDocument) + return fmt.Errorf("bad error doc, expected: %s, got %#v", errorDoc, out.ErrorDocument) } }