(diff): Support the --security-only
option for nested stacks
#30187
Labels
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
p2
package/tools
Related to AWS CDK Tools or CLI
Describe the feature
The diff command with the
--security-only
option prints only security changes.Resources such as newly created S3 buckets are ignored.
However, this does not work for Nested Stacks.
For example, suppose we have a stack like this.
If you add an IAM Role to the parent stack, it will be output as diff.
However, if it is added to Nested Stacks, it will not print as a diff.
Use Case
A case where you want to check only the security-related diffs that have been changed in Nested Stacks.
Proposed Solution
Code needs to be added to the
printSecurityDiff
function to check the diff of Nested Stacks.aws-cdk/packages/aws-cdk/lib/diff.ts
Line 115 in 65f2bd9
Other Information
No response
Acknowledgements
CDK version used
2.141.0
Environment details (OS name and version, etc.)
MacOS
The text was updated successfully, but these errors were encountered: