Skip to content

Instantly share code, notes, and snippets.

View dpup's full-sized avatar
💭
Building Range

Daniel Pupius dpup

💭
Building Range
View GitHub Profile
@dpup
dpup / encrypted-bucket.tf
Last active August 23, 2018 23:22
S3 Server-Side Encryption using KMS
# When specifying a named KMS Key for the S3 bucket, the default policy that
# terraform applies causes Access Denied errors for PutObject. This policy
# allows access to users with access to S3.
resource "aws_kms_key" "uploads" {
description = "Encrypts uploads stored in S3"
deletion_window_in_days = 10
policy = "${data.aws_iam_policy_document.uploads_key_policy.json}"
}