Skip to content

Commit 6081217

Browse files
Update s3.tf
1 parent e050145 commit 6081217

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

s3.tf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,18 @@ resource "aws_s3_bucket" "this" {
1717
},
1818
)
1919
}
20+
21+
resource "aws_kms_key" "this" {
22+
deletion_window_in_days = 10
23+
}
24+
25+
resource "aws_s3_bucket_server_side_encryption_configuration" "this" {
26+
bucket = aws_s3_bucket.this.bucket
27+
28+
rule {
29+
apply_server_side_encryption_by_default {
30+
kms_master_key_id = aws_kms_key.this.arn
31+
sse_algorithm = "aws:kms"
32+
}
33+
}
34+
}

0 commit comments

Comments
 (0)