File tree 3 files changed +22
-29
lines changed
3 files changed +22
-29
lines changed Original file line number Diff line number Diff line change 3
3
# #######
4
4
5
5
data "aws_iam_policy_document" "vertice_cur_bucket_access" {
6
- count = var. cur_bucket_name == null ? 0 : 1
6
+ statement {
7
+ sid = " AllowSSLRequestsOnly"
8
+ effect = " Deny"
9
+
10
+ actions = [
11
+ " s3:*" ,
12
+ ]
13
+
14
+ resources = [
15
+ " arn:aws:s3:::${ var . cur_bucket_name } " ,
16
+ " arn:aws:s3:::${ var . cur_bucket_name } /*"
17
+ ]
18
+
19
+ condition {
20
+ test = " Bool"
21
+ variable = " aws:SecureTransport"
22
+ values = [
23
+ " false"
24
+ ]
25
+ }
26
+ }
7
27
8
28
statement {
9
29
sid = " AllowCURBucketActions"
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ module "vertice_cur_bucket" {
9
9
10
10
attach_deny_insecure_transport_policy = true
11
11
attach_policy = true
12
- policy = data. aws_iam_policy_document . vertice_cur_bucket_access [ 0 ] . json
12
+ policy = data. aws_iam_policy_document . vertice_cur_bucket_access . json
13
13
14
14
versioning = var. cur_bucket_versioning
15
15
lifecycle_rule = var. cur_bucket_lifecycle_rules
Original file line number Diff line number Diff line change @@ -31,33 +31,6 @@ data "aws_iam_policy_document" "vertice_cur_bucket_access" {
31
31
]
32
32
}
33
33
34
- statement {
35
- sid = " AllowSSLRequestsOnly"
36
- effect = " Deny"
37
-
38
- actions = [
39
- " s3:*" ,
40
- ]
41
-
42
- resources = [
43
- " arn:aws:s3:::${ var . cur_bucket_name } " ,
44
- " arn:aws:s3:::${ var . cur_bucket_name } /*"
45
- ]
46
-
47
- principals {
48
- type = " *"
49
- identifiers = [" *" ]
50
- }
51
-
52
- condition {
53
- test = " Bool"
54
- variable = " aws:SecureTransport"
55
- values = [
56
- " false"
57
- ]
58
- }
59
- }
60
-
61
34
lifecycle {
62
35
precondition {
63
36
condition = var. cur_bucket_name != null
You can’t perform that action at this time.
0 commit comments