Skip to content

Commit 82ce4a1

Browse files
authored
chore(docs): clarify use of isOrganizationTrail (#21824)
If `isOrganizationTrail` is set to `true`, but the current AWS account is _not_ the management account then CloudFormation will throw an error. `You cannot configure or manage trails for an organization because this action requires being signed in with the management account.` Also remove the integration test that was added for this feature since in order to test this you would need access to an AWS organization management account _and_ access to create/delete an organization trail. ---- ### All Submissions: * [ ] 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 * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] 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*
1 parent e2dc2cb commit 82ce4a1

File tree

9 files changed

+3
-424
lines changed

9 files changed

+3
-424
lines changed

packages/@aws-cdk/aws-cloudtrail/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ trail.addLambdaEventSelector([ amazingFunction ]);
190190
## Organization Trail
191191

192192
It is possible to create a trail that will be applied to all accounts in an organization if the current account manages an organization.
193-
To enable this, the property `isOrganizationTrail` must be set. If this property is set and the current account does not manage an organization, the created trail will be created only for the account.
193+
To enable this, the property `isOrganizationTrail` must be set. If this property is set and the current account does not manage an organization, the stack will fail to deploy.
194194

195195
```ts
196196
new cloudtrail.Trail(this, 'OrganizationTrail', {

packages/@aws-cdk/aws-cloudtrail/lib/cloudtrail.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ export interface TrailProps {
119119
/**
120120
* Specifies whether the trail is applied to all accounts in an organization in AWS Organizations, or only for the current AWS account.
121121
*
122+
* If this is set to true then the current account _must_ be the management account. If it is not, then CloudFormation will throw an error.
123+
*
122124
* If this is set to true and the current account is a management account for an organization in AWS Organizations, the trail will be created in all AWS accounts that belong to the organization.
123125
* If this is set to false, the trail will remain in the current AWS account but be deleted from all member accounts in the organization.
124126
*

packages/@aws-cdk/aws-cloudtrail/test/cloudtrail.integ.snapshot/CloudtrailIntegTestStack.template.json

Lines changed: 0 additions & 116 deletions
This file was deleted.

packages/@aws-cdk/aws-cloudtrail/test/cloudtrail.integ.snapshot/TrailIntegTestDefaultTestDeployAssertA42C24D1.template.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@aws-cdk/aws-cloudtrail/test/cloudtrail.integ.snapshot/cdk.out

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@aws-cdk/aws-cloudtrail/test/cloudtrail.integ.snapshot/integ.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

packages/@aws-cdk/aws-cloudtrail/test/cloudtrail.integ.snapshot/manifest.json

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)