s3-log-storage

cloudposse/s3-log-storage/aws

Terraform Module HCL AWS

This module creates an S3 bucket suitable for receiving logs from other AWS services such as S3, CloudFront, and CloudTrail

Install
module "s3-log-storage" {
source = "cloudposse/s3-log-storage/aws"
version = "2.0.0"
}
⭐ Source on GitHub 📦 Registry page
README

This module creates an S3 bucket suitable for receiving logs from other AWS services such as S3, CloudFront, and CloudTrails. This module implements a configurable log retention policy, which allows you to efficiently manage logs across different storage classes (_e.g._ Glacier) and ultimately expire the data altogether. It enables default server-side encryption. It blocks public access to the bucket by default. As of March, 2022, this module is primarily a wrapper around our s3-bucket module, with some options preconfigured and SQS notifications added. If it does not exactly suit your needs, you may want to use the s3-bucket module directly. As of version 1.0 of this module, most of the inputs are marked nullable = false, meaning you can pass in null and get the default value rather than

Inputs (50)
NameTypeDescriptionDefault
namestringID element. Usually the component or solution name, e.g. 'app' or 'jenkins'. Thinull
tagsmap(string)Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`). Neither the tag keys nor the t{}
block_public_policyboolSet to `false` to disable the blocking of new public policies on the buckettrue
allow_ssl_requests_onlyboolSet to `true` to require requests to use Secure Socket Layer (HTTPS/SSL). This wtrue
environmentstringID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'stnull
delimiterstringDelimiter to be used between ID elements. Defaults to `-` (hyphen). Set to `""` null
lifecycle_prefixstring(Deprecated, use `lifecycle_configuration_rules` instead) Prefix filter. Used tonull
object_lock_configurationobject({ mode = string # A configuration for S3 object locking. With S3 Object Lock, you can store objectnull
grantslist(object({ id A list of policy grants for the bucket, taking a list of permissions. Conflicts []
source_policy_documentslist(string)List of IAM policy documents that are merged together into the exported document[]
kms_master_key_arnstringThe AWS KMS master key ARN used for the SSE-KMS encryption. This can only be use""
bucket_key_enabledboolSet this to true to use Amazon S3 Bucket Keys for SSE-KMS, which reduce the costfalse
enabledboolSet to false to prevent the module from creating any resourcesnull
enable_glacier_transitionbool(Deprecated, use `lifecycle_configuration_rules` instead) Enables the transitionnull
expiration_daysnumber(Deprecated, use `lifecycle_configuration_rules` instead) Number of days after wnull
standard_transition_daysnumber(Deprecated, use `lifecycle_configuration_rules` instead) Number of days to persnull
aclstringThe [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.ht"log-delivery-write"
force_destroyboolWhen `true`, permits a non-empty S3 bucket to be deleted by first deleting all ofalse
sse_algorithmstringThe server-side encryption algorithm to use. Valid values are AES256 and aws:kms"AES256"
restrict_public_bucketsboolSet to `false` to disable the restricting of making the bucket publictrue
… and 10 more inputs
Outputs (6)
bucket_domain_name — FQDN of bucket
bucket_id — Bucket Name (aka ID)
bucket_arn — Bucket ARN
prefix — Prefix configured for lifecycle rules
bucket_notifications_sqs_queue_arn — Notifications SQS queue ARN
enabled — Is module enabled
Resources (2)
aws_s3_bucket_notificationaws_sqs_queue
Details
FrameworkTerraform Module
LanguageHCL
Version2.0.0
Cloud AWS
★ Stars120
Forks105
Total downloads11.8M
Inputs50
Outputs6
Resources2
Examples1
LicenseApache-2.0
Namespacecloudposse
Updated