Skip to content

Instantly share code, notes, and snippets.

@joatmon08
Created May 2, 2019 22:12
Show Gist options
  • Save joatmon08/096795959e4471a383467c31aff28985 to your computer and use it in GitHub Desktop.
Save joatmon08/096795959e4471a383467c31aff28985 to your computer and use it in GitHub Desktop.
TDD-Infra-bucket-terraform
resource "aws_s3_bucket" "bucket" {
bucket = "${var.bucket_name}"
acl = "private"
policy = "${file("policies/bucket.json")}"
}
resource "aws_s3_bucket_public_access_block" "bucket" {
bucket = "${aws_s3_bucket.bucket.id}"
block_public_acls = true
block_public_policy = true
ignore_public_acls = true
restrict_public_buckets = true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment