Skip to content

Commit

Permalink
feat: Support bucket encryption for existing cloudtrail
Browse files Browse the repository at this point in the history
Signed-off-by: Lei Jin <lei.jin@lacework.net>
  • Loading branch information
leijin-lw committed Sep 5, 2024
1 parent e5ecd21 commit 4b84141
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lwgenerate/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -1058,14 +1058,14 @@ func createCloudtrail(args *GenerateAwsTfConfigurationArgs) (*hclwrite.Block, er
if args.BucketName != "" {
attributes["bucket_name"] = args.BucketName
}
if args.BucketEncryptionEnabledSet {
if args.BucketEncryptionEnabled {
if args.BucketSseKeyArn != "" {
attributes["bucket_sse_key_arn"] = args.BucketSseKeyArn
}
} else {
attributes["bucket_encryption_enabled"] = false
}
if args.BucketEncryptionEnabledSet {
if args.BucketEncryptionEnabled {
if args.BucketSseKeyArn != "" {
attributes["bucket_sse_key_arn"] = args.BucketSseKeyArn
}
} else {
attributes["bucket_encryption_enabled"] = false
}
}
if args.S3BucketNotification {
Expand Down

0 comments on commit 4b84141

Please sign in to comment.