Skip to content

Commit

Permalink
feat: add org-cloudtrail to lw_generate
Browse files Browse the repository at this point in the history
Signed-off-by: Darren Murray <darren.murray@lacework.net>
  • Loading branch information
dmurray-lacework committed Nov 6, 2023
1 parent a7d0edb commit 56ad547
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lwgenerate/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ type GenerateAwsTfConfigurationArgs struct {
// Optionally supply existing IAM role details
ExistingIamRole *ExistingIamRoleDetails

// Organization Cloudtrail
OrganizationTrail bool

// Existing SNS Topic
ExistingSnsTopicArn string

Expand Down Expand Up @@ -636,6 +639,11 @@ func createCloudtrail(args *GenerateAwsTfConfigurationArgs) (*hclwrite.Block, er
attributes["use_s3_bucket_notification"] = true
}

// org trail
if args.OrganizationTrail {
attributes["is_organization_trail"] = true
}

if len(args.SubAccounts) > 0 {
modDetails = append(modDetails, lwgenerate.HclModuleWithProviderDetails(map[string]string{"aws": "aws.main"}))
}
Expand Down

0 comments on commit 56ad547

Please sign in to comment.