-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(cloudtrail): (configuration for IsOrganizationTrail is failed) #21578
Comments
As a workaround, you should be able to use an escape hatch to override the property: import * as cloudtrail from "aws-cdk-lib/aws-cloudtrail";
// Create the L2 Trail resource with the preferred configuration
const trail = new cloudtrail.Trail(stack, "OrganizationTrail");
// Get the underlying AWS::CloudTrail::Trail L1 resource
const l1Trail = trail.node.defaultChild as cloudtrail.CfnTrail;
// Use the escape hatch to set the L1 AWS::CloudTrail::Trail resource's property
l1Trail.addPropertyOverride("IsOrganizationTrail", true); |
Thanks for the feature request @haikoschmidt, I am marking this issue as p2, which means that we are unable to work on this immediately. Check out our contributing guide if you're interested in contributing yourself - there's a low chance the team will be able to address this soon but we'd be happy to review a PR 🙂 Link to code where we declare the CfnTrail
|
Hello All,
Excerpts from this link attached in the bug report.
1- Do we expect any unintended side-effects or trails being un-intentionally deleted if we default it to false ? |
Hey @chinmayv2, The CloudFormation documentation mentions that this prop is set to false by default, so that's what we'd want to do here as well. Someone would have had to explicitly set this to true for the behavior to change, so if we keep the default as false or undefined then that will not affect existing users. |
It may be worth it to point to to CloudFormation that the documentation there is pretty confusing/misleading. I had to re-read it a few times to get what the actual behavior was. |
Fixes #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*
|
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*
Describe the feature
I miss the fact that I can use boolean to specify an OrganizationTrail as in CloudFormation.
https://docs.aws.amazon.com/de_de/AWSCloudFormation/latest/UserGuide/aws-resource-cloudtrail-trail.html#cfn-cloudtrail-trail-isorganizationtrail
Use Case
I am currently converting my payer configuration to CDK, at least what is available at all, which unfortunately is still very little at the moment. Using CloudFormation, I can specify whether a trail is an organization trail and whether it is then automatically rolled out throughout the organization.
Unfortunately, this is not yet possible with CDK.
Proposed Solution
Give an option that you can configure this using boolean, the default should be "false".
Other Information
No response
Acknowledgements
CDK version used
2.37.1
Environment details (OS name and version, etc.)
none
The text was updated successfully, but these errors were encountered: