diff --git a/lwgenerate/aws/aws.go b/lwgenerate/aws/aws.go index 44479223d..4036c26e4 100644 --- a/lwgenerate/aws/aws.go +++ b/lwgenerate/aws/aws.go @@ -111,6 +111,9 @@ type GenerateAwsTfConfigurationArgs struct { // Optionally supply existing IAM role details ExistingIamRole *ExistingIamRoleDetails + // Organization Cloudtrail + OrganizationTrail bool + // Existing SNS Topic ExistingSnsTopicArn string @@ -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"})) }