forked from aws/aws-cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cloudtrail): add configuration for IsOrganizationTrail (aws#21625)
Fixes aws#21578 Please add `pr-linter/exempt-readme` label since this property needs no entry in the README imho. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
1 parent
b9967eb
commit 294431b
Showing
33 changed files
with
788 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 118 additions & 0 deletions
118
.../asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/__entrypoint__.js
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
119 changes: 0 additions & 119 deletions
119
.../asset.be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824/__entrypoint__.js
This file was deleted.
Oops, something went wrong.
10 changes: 5 additions & 5 deletions
10
...loudtrail/test/cloudtrail-supplied-bucket.lit.integ.snapshot/integ-cloudtrail.assets.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
116 changes: 116 additions & 0 deletions
116
...-cdk/aws-cloudtrail/test/cloudtrail.integ.snapshot/CloudtrailIntegTestStack.template.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
{ | ||
"Resources": { | ||
"TrailS30071F172": { | ||
"Type": "AWS::S3::Bucket", | ||
"UpdateReplacePolicy": "Retain", | ||
"DeletionPolicy": "Retain" | ||
}, | ||
"TrailS3PolicyE42170FE": { | ||
"Type": "AWS::S3::BucketPolicy", | ||
"Properties": { | ||
"Bucket": { | ||
"Ref": "TrailS30071F172" | ||
}, | ||
"PolicyDocument": { | ||
"Statement": [ | ||
{ | ||
"Action": "s3:*", | ||
"Condition": { | ||
"Bool": { | ||
"aws:SecureTransport": "false" | ||
} | ||
}, | ||
"Effect": "Deny", | ||
"Principal": { | ||
"AWS": "*" | ||
}, | ||
"Resource": [ | ||
{ | ||
"Fn::GetAtt": [ | ||
"TrailS30071F172", | ||
"Arn" | ||
] | ||
}, | ||
{ | ||
"Fn::Join": [ | ||
"", | ||
[ | ||
{ | ||
"Fn::GetAtt": [ | ||
"TrailS30071F172", | ||
"Arn" | ||
] | ||
}, | ||
"/*" | ||
] | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"Action": "s3:GetBucketAcl", | ||
"Effect": "Allow", | ||
"Principal": { | ||
"Service": "cloudtrail.amazonaws.com" | ||
}, | ||
"Resource": { | ||
"Fn::GetAtt": [ | ||
"TrailS30071F172", | ||
"Arn" | ||
] | ||
} | ||
}, | ||
{ | ||
"Action": "s3:PutObject", | ||
"Condition": { | ||
"StringEquals": { | ||
"s3:x-amz-acl": "bucket-owner-full-control" | ||
} | ||
}, | ||
"Effect": "Allow", | ||
"Principal": { | ||
"Service": "cloudtrail.amazonaws.com" | ||
}, | ||
"Resource": { | ||
"Fn::Join": [ | ||
"", | ||
[ | ||
{ | ||
"Fn::GetAtt": [ | ||
"TrailS30071F172", | ||
"Arn" | ||
] | ||
}, | ||
"/AWSLogs/", | ||
{ | ||
"Ref": "AWS::AccountId" | ||
}, | ||
"/*" | ||
] | ||
] | ||
} | ||
} | ||
], | ||
"Version": "2012-10-17" | ||
} | ||
} | ||
}, | ||
"Trail022F0CF2": { | ||
"Type": "AWS::CloudTrail::Trail", | ||
"Properties": { | ||
"IsLogging": true, | ||
"S3BucketName": { | ||
"Ref": "TrailS30071F172" | ||
}, | ||
"EnableLogFileValidation": true, | ||
"EventSelectors": [], | ||
"IncludeGlobalServiceEvents": true, | ||
"IsMultiRegionTrail": true, | ||
"IsOrganizationTrail": true | ||
}, | ||
"DependsOn": [ | ||
"TrailS3PolicyE42170FE" | ||
] | ||
} | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...est/cloudtrail.integ.snapshot/TrailIntegTestDefaultTestDeployAssertA42C24D1.template.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
1 change: 1 addition & 0 deletions
1
packages/@aws-cdk/aws-cloudtrail/test/cloudtrail.integ.snapshot/cdk.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"version":"20.0.0"} |
11 changes: 11 additions & 0 deletions
11
packages/@aws-cdk/aws-cloudtrail/test/cloudtrail.integ.snapshot/integ.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"version": "20.0.0", | ||
"testCases": { | ||
"TrailIntegTest/DefaultTest": { | ||
"stacks": [ | ||
"CloudtrailIntegTestStack" | ||
], | ||
"assertionStack": "TrailIntegTestDefaultTestDeployAssertA42C24D1" | ||
} | ||
} | ||
} |
Oops, something went wrong.