-
Notifications
You must be signed in to change notification settings - Fork 0
/
storage.tf
45 lines (45 loc) · 1.07 KB
/
storage.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
37
38
39
40
41
42
43
44
45
resource "aws_s3_bucket" "s3-lb-logs-env-test" {
bucket = "s3-lb-logs-env-test-bucket"
acl = "private"
force_destroy = true
policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::054676820928:root"
},
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::s3-lb-logs-env-test-bucket/test-lb/AWSLogs/411705946934/*"
},
{
"Effect": "Allow",
"Principal": {
"Service": "delivery.logs.amazonaws.com"
},
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::s3-lb-logs-env-test-bucket/test-lb/AWSLogs/411705946934/*",
"Condition": {
"StringEquals": {
"s3:x-amz-acl": "bucket-owner-full-control"
}
}
},
{
"Effect": "Allow",
"Principal": {
"Service": "delivery.logs.amazonaws.com"
},
"Action": "s3:GetBucketAcl",
"Resource": "arn:aws:s3:::s3-lb-logs-env-test-bucket"
}
]
}
EOF
tags = {
Name = "Access Logs bucket"
Environment = "Dev"
}
}