cloudtrail

azavea/cloudtrail/aws

Terraform Module HCL AWS

A Terraform module to create an Amazon Web Services (AWS) CloudTrail Trail.

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

terraform-aws-cloudtrail A Terraform module to create an Amazon Web Services (AWS) CloudTrail trail. Usage This module creates a trail that logs to an S3 bucket. The module can be configured to log to an existing S3 bucket, or to make a new one for you automatically. ``hcl module "cloudtrail" { source = "github.com/azavea/terraform-aws-cloudtrail?ref=0.1.0" region = "us-east-1" create_s3_bucket = true s3_bucket_name = "mysite-logs" s3_key_prefix = "cloudtrail" enable_s3_bucket_expiration = false s3_bucket_days_to_expiration = 90 enable_s3_bucket_transition = true s3_bucket_days_to_transition = 90 s3_bucket_transition_storage_class = "ONEZONE_IA" enable_logging = true enable_log_file_validation = false include_global_service_events = true is_multi_region_trail = false is_organization_trail

Inputs (16)
NameTypeDescriptionDefault
s3_bucket_nameanyName of the S3 bucket to store logs in (required). required
environmentanyName of the environment this Trail is targeting."Unknown"
create_s3_bucketanySpecifies whether to create a new S3 bucket. When false, you must provide a vali"true"
s3_bucket_transition_storage_classanySpecifies the S3 storage class to which logs will transition for archival. Only "ONEZONE_IA"
is_multi_region_trailanySpecifies whether the trail is created in the current region or in all regions."false"
enable_log_file_validationanySpecifies whether log file integrity validation is enabled."false"
is_organization_trailanySpecifies whether the trail is an AWS Organizations trail, which must be created"false"
regionanyName of the region where the Trail should be created."us-east-1"
s3_bucket_days_to_transitionanyHow many days to store logs before they will be transitioned to a new storage cl"90"
include_global_service_eventsanySpecifies whether the trail is publishing events from global services such as IA"true"
projectanyProject name, used for tagging and naming the Trail."Unknown"
enable_s3_bucket_expirationanySpecifies whether to enable an expiration policy for the log storage bucket."false"
s3_bucket_days_to_expirationanyHow many days to store logs before they will be deleted. Only applies if `enable"90"
enable_s3_bucket_transitionanySpecifies whether to enable a storage class transition for the S3 bucket."true"
enable_logginganySpecifies whether to enable logging for the trail."true"
s3_key_prefixanySpecifies the S3 key prefix that precedes the name of the bucket you have design""
Outputs (5)
id — The name of the trail.
home_region — The region in which the trail was created.
arn — The Amazon Resource Name of the trail.
bucket_id — The name of the log bucket, if one was created -- otherwise, an empty string.
bucket_arn — The Amazon Resource Name of the log bucket, if one was created -- otherwise, an empty string.
Resources (3)
aws_cloudtrailaws_s3_bucketaws_s3_bucket_policy
Details
FrameworkTerraform Module
LanguageHCL
Version0.1.0
Cloud AWS
★ Stars4
Forks9
Total downloads6.6k
Inputs16
Outputs5
Resources3
LicenseApache-2.0
Namespaceazavea
Updated