-
Notifications
You must be signed in to change notification settings - Fork 3
/
s3.tf
36 lines (33 loc) · 926 Bytes
/
s3.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
resource "aws_s3_bucket" "issuer" {
#checkov:skip=CKV_AWS_18
#checkov:skip=CKV_AWS_21
#checkov:skip=CKV_AWS_144
#checkov:skip=CKV_AWS_145
#checkov:skip=CKV2_AWS_6
#checkov:skip=CKV2_AWS_61
#checkov:skip=CKV2_AWS_62
bucket = "${replace(var.name, ".", "-")}-irsa-issuer"
force_destroy = true
}
resource "aws_s3_bucket_ownership_controls" "issuer" {
#checkov:skip=CKV2_AWS_65
bucket = aws_s3_bucket.issuer.id
rule {
object_ownership = "BucketOwnerPreferred"
}
}
resource "aws_s3_bucket_public_access_block" "issuer" {
#checkov:skip=CKV_AWS_53
#checkov:skip=CKV_AWS_54
#checkov:skip=CKV_AWS_55
#checkov:skip=CKV_AWS_56
bucket = aws_s3_bucket.issuer.id
block_public_acls = false
block_public_policy = false
ignore_public_acls = false
restrict_public_buckets = false
}
moved {
from = aws_s3_bucket.issuer[0]
to = aws_s3_bucket.issuer
}