Skip to content

Commit befb02f

Browse files
committed
feat: add aws_s3_bucket_public_access_block to remove snyk warning
1 parent f9c8a03 commit befb02f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

backup.tf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ resource "aws_s3_bucket" "gitlab_backup" {
1010

1111
tags = merge(local.default_tags, var.additional_tags)
1212

13-
aws_s3_bucket_public_access_block = {
14-
block_public_acls = true
15-
}
16-
1713
lifecycle {
1814
precondition {
1915
condition = anytrue([
@@ -24,11 +20,15 @@ resource "aws_s3_bucket" "gitlab_backup" {
2420
}
2521
}
2622
}
27-
28-
resource "aws_s3_bucket_acl" "gitlab_backup" {
23+
q
24+
resource "aws_s3_bucket_public_access_block" "this" {
2925
count = var.enable_gitlab_backup_to_s3 ? 1 : 0
3026
bucket = aws_s3_bucket.gitlab_backup[0].id
31-
acl = "private"
27+
28+
block_public_acls = true
29+
block_public_policy = true
30+
ignore_public_acls = true
31+
restrict_public_buckets = true
3232
}
3333

3434
data "aws_iam_policy_document" "gitlab_s3_backup" {

0 commit comments

Comments
 (0)