Skip to content

Instantly share code, notes, and snippets.

@100daysofdevops
Created March 5, 2019 18:21
Show Gist options
  • Save 100daysofdevops/c981a9e60d4b8fd8e0d51a951ba731ee to your computer and use it in GitHub Desktop.
Save 100daysofdevops/c981a9e60d4b8fd8e0d51a951ba731ee to your computer and use it in GitHub Desktop.
provider "aws" {
region = "us-west-2"
}
resource "aws_s3_bucket" "mybucket" {
bucket = "mys3bucket-withkms-serverside-encryption"
server_side_encryption_configuration {
rule {
apply_server_side_encryption_by_default {
kms_master_key_id = "${var.kms_key}"
sse_algorithm = "aws:kms"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment