-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paths3.tf
More file actions
65 lines (54 loc) · 1.5 KB
/
s3.tf
File metadata and controls
65 lines (54 loc) · 1.5 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# S3 Bucket for video uploads
resource "aws_s3_bucket" "video_uploads" {
bucket = "video2frames-video-uploads"
tags = merge(
var.tags,
{
Name = "Video Uploads Bucket"
}
)
}
# Block public access for video uploads bucket
resource "aws_s3_bucket_public_access_block" "video_uploads" {
bucket = aws_s3_bucket.video_uploads.id
block_public_acls = true
block_public_policy = true
ignore_public_acls = true
restrict_public_buckets = true
}
# Enable encryption for video uploads bucket
resource "aws_s3_bucket_server_side_encryption_configuration" "video_uploads" {
bucket = aws_s3_bucket.video_uploads.id
rule {
apply_server_side_encryption_by_default {
sse_algorithm = "AES256"
}
}
}
# S3 Bucket for extracted frames
resource "aws_s3_bucket" "extracted_frames" {
bucket = "video2frames-extracted-frames"
tags = merge(
var.tags,
{
Name = "Extracted Frames Bucket"
}
)
}
# Block public access for extracted frames bucket
resource "aws_s3_bucket_public_access_block" "extracted_frames" {
bucket = aws_s3_bucket.extracted_frames.id
block_public_acls = true
block_public_policy = true
ignore_public_acls = true
restrict_public_buckets = true
}
# Enable encryption for extracted frames bucket
resource "aws_s3_bucket_server_side_encryption_configuration" "extracted_frames" {
bucket = aws_s3_bucket.extracted_frames.id
rule {
apply_server_side_encryption_by_default {
sse_algorithm = "AES256"
}
}
}