cloudtrail-s3-bucket

cloudposse/cloudtrail-s3-bucket/aws

Terraform Module HCL AWS

S3 bucket with built in IAM policy to allow CloudTrail logs

Install
module "cloudtrail-s3-bucket" {
source = "cloudposse/cloudtrail-s3-bucket/aws"
version = "0.32.0"
}
plain text: /constructs/tfmod-cloudposse-cloudtrail-s3-bucket-aws/install.txt
⭐ Source on GitHub 📦 Registry page
README

Terraform module to provision an S3 bucket with built in policy to allow CloudTrail logs. This is useful if an organization uses a number of separate AWS accounts to isolate the Audit environment from other environments (production, staging, development). In this case, you create CloudTrail in the production environment (Production AWS account), while the S3 bucket to store the CloudTrail logs is created in the Audit AWS account, restricting access to the logs only to the users/groups from the Audit account. The module supports the following: 1. Forced server-side encryption at rest for the S3 bucket 2. S3 bucket versioning to easily recover from both unintended user actions and application failures 3. S3 bucket is protected from deletion if it's not empty (force_destroy set to false) 4. S

Inputs (45)
NameTypeDescriptionDefault
sse_algorithmstringThe server-side encryption algorithm to use. Valid values are AES256 and aws:kms"AES256"
kms_master_key_arnstringThe AWS KMS master key ARN used for the SSE-KMS encryption. This can only be use""
standard_transition_daysnumberNumber of days to persist in the standard storage tier before moving to the infr30
access_log_bucket_namestringName of the S3 bucket where s3 access log will be sent to""
bucket_notifications_typestringType of the notification configuration. Only SQS is supported."SQS"
attributeslist(string)ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`, []
tagsmap(string)Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`). Neither the tag keys nor the t{}
noncurrent_version_transition_daysnumberSpecifies when noncurrent object versions transitions30
block_public_aclsboolSet to `false` to disable the blocking of new public access lists on the buckettrue
restrict_public_bucketsboolSet to `false` to disable the restricting of making the bucket publictrue
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
regex_replace_charsstringTerraform regular expression (regex) string. Characters matching the regex will null
aclstringThe canned ACL to apply. We recommend log-delivery-write for compatibility with "log-delivery-write"
ignore_public_aclsboolSet to `false` to disable the ignoring of public access lists on the buckettrue
object_lock_configurationobject({ mode = string # A configuration for S3 object locking. With S3 Object Lock, you can store objectnull
namespacestringID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp'null
tenantstringID element _(Rarely used, not included by default)_. A customer identifier, indinull
label_value_casestringControls the letter case of ID elements (labels) as included in `id`, set as tagnull
lifecycle_prefixstringPrefix filter. Used to manage object lifecycle events""
… and 5 more inputs
Outputs (5)
bucket_domain_name — FQDN of bucket
bucket_id — Bucket ID
bucket_arn — Bucket ARN
prefix — Prefix configured for lifecycle rules
bucket_notifications_sqs_queue_arn — Notifications SQS queue ARN
Details
FrameworkTerraform Module
LanguageHCL
Version0.32.0
Cloud AWS
★ Stars58
Forks64
Total downloads768.4k
Inputs45
Outputs5
Examples1
LicenseApache-2.0
Namespacecloudposse
Updated