Merge pull request #339 from Hestia-Homes/retrofit-assessmet-api

blocking public access
This commit is contained in:
KhalimCK 2024-09-09 13:24:41 +01:00 committed by GitHub
commit 3f195caa9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,7 +6,7 @@ resource "aws_s3_bucket" "bucket" {
allowed_headers = ["Content-Type", "Authorization"]
allowed_methods = ["PUT"]
allowed_origins = var.allowed_origins
expose_headers = ["ETag"]
expose_headers = ["ETag"]
max_age_seconds = 3000
}
@ -73,3 +73,11 @@ resource "aws_iam_user_policy" "presign_frontend_user_policy" {
}
EOF
}
resource "aws_s3_bucket_public_access_block" "block_public" {
bucket = aws_s3_bucket.bucket.id
block_public_acls = true
block_public_policy = true
ignore_public_acls = true
restrict_public_buckets = true
}