Skip to content
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

cli: let cdk diff show nested templates also with --template #23395

Open
1 of 2 tasks
oxc opened this issue Dec 19, 2022 · 0 comments
Open
1 of 2 tasks

cli: let cdk diff show nested templates also with --template #23395

oxc opened this issue Dec 19, 2022 · 0 comments
Labels
effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p1 package/tools Related to AWS CDK Tools or CLI

Comments

@oxc
Copy link

oxc commented Dec 19, 2022

Describe the feature

With #18207 the CLI command cdk diff got support for showing changes to nested templates when comparing against a deployment. It would be nice if we could use the same feature also when comparing against a synthesized template with `--template``

Use Case

In our CI/CD pipeline we want to show the changes a PR causes to the template. For this, we compare the synthesized template against the one synthesized from the base branch (using something like cdk diff --template cdk-base.out/MyStack.template --app cdk.out --exclusively MyStack).
Unfortunately this does not show information about nested stacks except that their template has changed.

Comparing against deployment is not a viable solution, because the base branch often already contains other changes that have not yet been deployed, which would then also show up in the diff, even though they are completely unrelated.

Proposed Solution

A possible solution could be to let --template specify a directory (usually cdk.out), not only a single template. The diff algorithm would then pick up the nested stack templates and add them to the parent diff.

This would perhaps also remove the necessity to use --exclusively to ensure only a single stack is compared.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.54.0

Environment details (OS name and version, etc.)

Ubuntu 22.04.1 (via Windows WSL)

@oxc oxc added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Dec 19, 2022
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Dec 19, 2022
@rix0rrr rix0rrr added effort/medium Medium work item – several days of effort p2 and removed needs-triage This issue or PR still needs to be triaged. labels Jan 4, 2023
@rix0rrr rix0rrr removed their assignment Jan 4, 2023
@rix0rrr rix0rrr added p1 and removed p2 labels Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p1 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

No branches or pull requests

2 participants