File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,6 @@ resource "aws_s3_bucket" "gitlab_backup" {
10
10
11
11
tags = merge (local. default_tags , var. additional_tags )
12
12
13
- aws_s3_bucket_public_access_block = {
14
- block_public_acls = true
15
- }
16
-
17
13
lifecycle {
18
14
precondition {
19
15
condition = anytrue ([
@@ -24,11 +20,15 @@ resource "aws_s3_bucket" "gitlab_backup" {
24
20
}
25
21
}
26
22
}
27
-
28
- resource "aws_s3_bucket_acl " "gitlab_backup " {
23
+ q
24
+ resource "aws_s3_bucket_public_access_block " "this " {
29
25
count = var. enable_gitlab_backup_to_s3 ? 1 : 0
30
26
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
32
32
}
33
33
34
34
data "aws_iam_policy_document" "gitlab_s3_backup" {
You can’t perform that action at this time.
0 commit comments