Terraform resource: aws s3 bucket server side encryption configuration

From wikieduonline
Revision as of 11:49, 9 July 2024 by Welcome (talk | contribs) (→‎Related)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

aws_s3_bucket_server_side_encryption_configuration

Resource not supported with S3 directory buckets.

Official usage[edit]

resource "aws_kms_key" "mykey" {
  description             = "This key is used to encrypt bucket objects"
  deletion_window_in_days = 10
}

resource "aws_s3_bucket" "mybucket" {
  bucket = "mybucket"
}

resource "aws_s3_bucket_server_side_encryption_configuration" "example" {
  bucket = aws_s3_bucket.mybucket.id

  rule {
    apply_server_side_encryption_by_default {
      kms_master_key_id = aws_kms_key.mykey.arn
      sse_algorithm     = "aws:kms"
    }
  }
}


Related[edit]

See also[edit]

Advertising: