Hi@akhtar,
To control the access of the S3 bucket you need to use the aws_s3_bucket_public_access_block resource in your Terraform code as shown below.
resource "aws_s3_bucket_public_access_block" "s3Public" {
bucket = "${aws_s3_bucket.bucket.id}"
block_public_acls = true
block_public_policy = true
restrict_public_buckets = true
}