Skip to content

Commit

Permalink
chore: remove iam role attributes from CloudTrail if Config org enabl…
Browse files Browse the repository at this point in the history
…ed (#1456)
  • Loading branch information
PengyuanZhao authored Nov 17, 2023
1 parent 6f7ced5 commit cbbcb1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lwgenerate/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ func createCloudtrail(args *GenerateAwsTfConfigurationArgs) (*hclwrite.Block, er
attributes["sqs_encryption_enabled "] = false
}
}
if args.ExistingIamRole.IsEmpty() && args.Config {
if args.ExistingIamRole.IsEmpty() && args.Config && !args.AwsOrganization {
attributes["use_existing_iam_role"] = true
attributes["iam_role_name"] = lwgenerate.CreateSimpleTraversal(
[]string{"module", "aws_config", "iam_role_name"})
Expand Down

0 comments on commit cbbcb1f

Please sign in to comment.