Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(aws-s3): Wrong type stated as the default for Bucket's blockPublicAccess prop #12978

Closed
douglasnaphas opened this issue Feb 11, 2021 · 2 comments · Fixed by #12983
Closed

(aws-s3): Wrong type stated as the default for Bucket's blockPublicAccess prop #12978

douglasnaphas opened this issue Feb 11, 2021 · 2 comments · Fixed by #12983
Assignees
Labels
@aws-cdk/aws-s3 Related to Amazon S3 documentation This is a problem with documentation. effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@douglasnaphas
Copy link
Contributor

https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.Bucket.html#blockpublicaccess

In the above section of the docs, the default for Bucket's constructor prop of blockPublicAccess is stated as false, but the type of the blockPublicAccess prop is BlockPublicAccess, not boolean.

I am not able to compile, for example:

const myBucket = new s3.Bucket(this, "MyBucket", {
  blockPublicAccess: false,
});

I get the error:

Type 'false' is not assignable to type 'BlockPublicAccess | undefined'

I don't see an assignment to blockPublicAccess prior to where we pass it on to the CfnBucket, so maybe instead of @default false here we need default undefined?


This is a 📕 documentation issue

@douglasnaphas douglasnaphas added documentation This is a problem with documentation. feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 11, 2021
@github-actions github-actions bot added the @aws-cdk/aws-s3 Related to Amazon S3 label Feb 11, 2021
@iliapolo iliapolo added effort/small Small work item – less than a day of effort p2 and removed needs-triage This issue or PR still needs to be triaged. labels Feb 11, 2021
@iliapolo
Copy link
Contributor

@douglasnaphas Thanks!

@mergify mergify bot closed this as completed in #12983 Feb 21, 2021
mergify bot pushed a commit that referenced this issue Feb 21, 2021
…eading (#12983)

Fixes #12978 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

eladb pushed a commit that referenced this issue Feb 22, 2021
…eading (#12983)

Fixes #12978 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-s3 Related to Amazon S3 documentation This is a problem with documentation. effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants