File tree 1 file changed +26
-0
lines changed
terragrunt/modules/crates-io
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,32 @@ resource "aws_iam_user_policy_attachment" "heroku_static_write" {
70
70
policy_arn = aws_iam_policy. static_write . arn
71
71
}
72
72
73
+ resource "aws_iam_policy" "cdn_logs_read" {
74
+ name = " ${ var . iam_prefix } --cdn-logs-read"
75
+ description = " Read access to the S3 bucket with CDN logs"
76
+
77
+ policy = jsonencode ({
78
+ Version = " 2012-10-17"
79
+ Statement = [
80
+ {
81
+ Sid = " CDNLogsRead"
82
+ Effect = " Allow"
83
+ Action = [
84
+ " s3:GetObject" ,
85
+ ]
86
+ Resource = [
87
+ " ${ aws_s3_bucket . logs . arn } /*" ,
88
+ ]
89
+ }
90
+ ]
91
+ })
92
+ }
93
+
94
+ resource "aws_iam_user_policy_attachment" "heroku_cdn_logs_read" {
95
+ user = aws_iam_user. heroku . name
96
+ policy_arn = aws_iam_policy. cdn_logs_read . arn
97
+ }
98
+
73
99
resource "aws_iam_role" "s3_replication" {
74
100
name = " ${ var . iam_prefix } --s3-replication"
75
101
You can’t perform that action at this time.
0 commit comments