-
-
Notifications
You must be signed in to change notification settings - Fork 839
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
Removed deprecated argument object_lock_enabled
in aws_s3_bucket
#144
Conversation
…bucket in resource aws_s3_bucket_object_lock_configuration.default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bridgecrew has found infrastructure configuration errors in this PR ⬇️
In the current docs, it does not show as deprecated |
Thanks for the review. Here is from https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket
|
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure S3 Bucket has public access blocks
Resource: aws_s3_bucket.default | ID: BC_AWS_NETWORKING_52
How to Fix
resource "aws_s3_bucket" "bucket_good_1" {
bucket = "bucket_good"
}
resource "aws_s3_bucket_public_access_block" "access_good_1" {
bucket = aws_s3_bucket.bucket_good_1.id
block_public_acls = true
block_public_policy = true
}
Description
When you create an S3 bucket, it is good practice to set the additional resource **aws_s3_bucket_public_access_block** to ensure the bucket is never accidentally public.We recommend you ensure S3 bucket has public access blocks. If the public access block is not attached it defaults to False.
Dependent Resources
Calculating...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change details
-
Error ID Change Path Resource BC_AWS_NETWORKING_52 Added /main.tf aws_s3_bucket.default
/test all |
@imran-init makes sense to me. Nice catch! |
Hmm unfortunately without this, we run into this error
Have you been able to test this locally ? |
Ah here is the full description
References:
It sounds like the deprecation notice is wrong in the hashicorp/aws provider to be honest so I'm going to close this PR for now until there is a strong reason to bring this back. |
object_lock_enabled
in aws_s3_bucket
…bucket in resource aws_s3_bucket_object_lock_configuration.default
what
why
references