Standarized set up for a private, encrypted S3 bucket with versioning. Used for any private files from an application, e.g. PDF files linked to a record.
module "s3-storage" {
source = "github.com/dbl-works/terraform//s3-private?ref=v2021.11.13"
# Required
environment = "staging"
project = "someproject"
bucket_name = "someproject-staging-storage"
# Optional
kms_deletion_window_in_days = 30
versioning = true
primary_storage_class_retention = 0
}
arn
: you probably want to pass this arn to ECSgrant_write_access_to_s3_arns
kms-key-arn
: you probably want to pass this arn to ECSkms_key_arns
group-usage-name
: name of the AWS IAM group to grant usage permissions to the bucket