Difference between revisions of "Aws s3 bucket public access block"

From wikieduonline
Jump to navigation Jump to search
Line 2: Line 2:
 
* https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_public_access_block
 
* https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_public_access_block
 
  aws_s3_bucket_public_access_block
 
  aws_s3_bucket_public_access_block
 +
 +
 +
== Official example ==
 +
resource "aws_s3_bucket" "example" {
 +
  bucket = "example"
 +
}
 +
 +
resource "aws_s3_bucket_public_access_block" "example" {
 +
  bucket = aws_s3_bucket.example.id
 +
 +
  block_public_acls      = true
 +
  block_public_policy    = true
 +
  ignore_public_acls      = true
 +
  restrict_public_buckets = true
 +
}
  
  

Revision as of 03:31, 6 June 2024

aws_s3_bucket_public_access_block


Official example

resource "aws_s3_bucket" "example" {
  bucket = "example"
}

resource "aws_s3_bucket_public_access_block" "example" {
 bucket = aws_s3_bucket.example.id
 block_public_acls       = true
 block_public_policy     = true
 ignore_public_acls      = true
 restrict_public_buckets = true
}


See also

Advertising: