cloudtrail

cloudposse/cloudtrail/aws

Terraform Module HCL AWS

Terraform module to provision an AWS CloudTrail and an encrypted S3 bucket with versioning to store CloudTrail logs

Install
module "cloudtrail" {
source = "cloudposse/cloudtrail/aws"
version = "0.24.0"
}
⭐ Source on GitHub 📦 Registry page
README

terraform-aws-cloudtrail Terraform module to provision an AWS CloudTrail. The module accepts an encrypted S3 bucket with versioning to store CloudTrail logs. The bucket could be from the same AWS account or from a different account. 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. > [!TIP] > #### 👽 Use Atmos with Terraform > Cloud Posse uses atmos to easily orchestrate multiple environments using Terraform. > Works with G

Inputs (32)
NameTypeDescriptionDefault
s3_bucket_namestringS3 bucket name for CloudTrail logs required
contextanySingle object for setting entire context at once. See description of individual { "additional_tag_map": {}, "attribu
regex_replace_charsstringTerraform regular expression (regex) string. Characters matching the regex will null
cloud_watch_logs_role_arnstringSpecifies the role for the CloudWatch Logs endpoint to assume to write to a user""
sns_topic_namestringSpecifies the name of the Amazon SNS topic defined for notification of log file null
enabledboolSet to false to prevent the module from creating any resourcesnull
delimiterstringDelimiter to be used between ID elements. Defaults to `-` (hyphen). Set to `""` null
include_global_service_eventsboolSpecifies whether the trail is publishing events from global services such as IAfalse
additional_tag_mapmap(string)Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not add{}
label_orderlist(string)The order in which the labels (ID elements) appear in the `id`. Defaults to ["nanull
insight_selectorlist(object({ insight_typeSpecifies an insight selector for type of insights to log on a trail[]
is_organization_trailboolThe trail is an AWS Organizations trailfalse
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{}
label_value_casestringControls the letter case of ID elements (labels) as included in `id`, set as tagnull
attributeslist(string)ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`, []
labels_as_tagsset(string)Set of labels (ID elements) to include as tags in the `tags` output. Default is [ "default" ]
enable_log_file_validationboolSpecifies whether log file integrity validation is enabled. Creates signed digestrue
event_selectorlist(object({ include_manaSpecifies an event selector for enabling data event logging. See: https://www.te[]
cloud_watch_logs_group_arnstringSpecifies a log group name using an Amazon Resource Name (ARN), that represents ""
s3_key_prefixstringPrefix for S3 bucket used by Cloudtrail to store logsnull
Outputs (3)
cloudtrail_id — The ID of the trail. (Name for provider < v5, ARN for provider >= v5).
cloudtrail_home_region — The region in which the trail was created
cloudtrail_arn — The Amazon Resource Name of the trail
Resources (1)
aws_cloudtrail
Details
FrameworkTerraform Module
LanguageHCL
Version0.24.0
Cloud AWS
★ Stars120
Forks86
Total downloads1.0M
Inputs32
Outputs3
Resources1
Examples1
LicenseApache-2.0
Namespacecloudposse
Updated