diff --git a/builtin/providers/aws/resource_aws_s3_bucket_test.go b/builtin/providers/aws/resource_aws_s3_bucket_test.go index 6dc5dfc86..9030b49b6 100644 --- a/builtin/providers/aws/resource_aws_s3_bucket_test.go +++ b/builtin/providers/aws/resource_aws_s3_bucket_test.go @@ -443,7 +443,7 @@ func testAccCheckAWSS3BucketWebsite(n string, indexDoc string, errorDoc string, if *v.HostName != redirectTo { return fmt.Errorf("bad redirect to, expected: %s, got %#v", redirectTo, out.RedirectAllRequestsTo) } - if redirectProtocol != "" && *v.Protocol != redirectProtocol { + if redirectProtocol != "" && v.Protocol != nil && *v.Protocol != redirectProtocol { return fmt.Errorf("bad redirect protocol to, expected: %s, got %#v", redirectProtocol, out.RedirectAllRequestsTo) } }