Skip to content

Commit

Permalink
Merge pull request #85 from silinternational/develop
Browse files Browse the repository at this point in the history
Release 8.5.0 - new Cloudtrail module input
  • Loading branch information
briskt authored Jun 27, 2023
2 parents 36348bc + 1201d41 commit 76f7f54
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aws/cloudtrail/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ This module is used to set up CloudTrail logging for your AWS account.

## Optional Inputs

- `cloudtrail_name` - The name for your Trail in AWS CloudTrail
- `cloudtrail_name` - The name for your Trail in AWS CloudTrail. Default: `"aws-account-cloudtrail"`
- `is_multi_region_trail` - Whether the trail is created in the current region or in all regions. Default: `false`

## Outputs

Expand Down
1 change: 1 addition & 0 deletions aws/cloudtrail/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,6 @@ resource "aws_cloudtrail" "cloudtrail" {
name = var.cloudtrail_name
s3_bucket_name = aws_s3_bucket.cloudtrail.id
include_global_service_events = true
is_multi_region_trail = var.is_multi_region_trail
}

6 changes: 6 additions & 0 deletions aws/cloudtrail/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ variable "cloudtrail_name" {
type = string
}

variable "is_multi_region_trail" {
description = "Whether the trail is created in the current region or in all regions"
type = bool
default = false
}

variable "s3_bucket_name" {
description = "The name for the S3 bucket where your CloudTrail logs will be stored"
type = string
Expand Down
5 changes: 5 additions & 0 deletions test/cloudtrail.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module "cloudtrail" {
source = "../aws/cloudtrail"
cloudtrail_name = "cloudtrail_name"
s3_bucket_name = "s3_bucket_name"
}

0 comments on commit 76f7f54

Please sign in to comment.