Description
Describe the feature
Now that cdk deploy supports --import-existing-resources
flag (#32676), cdk diff should support it as well.
Use Case
I want to know which resources are imported before deployment by just executing cdk diff
.
Proposed Solution
Users should be able to just run cdk diff --import-existing-resources
, and get a table of resources that will be imported.
CDK diff already supports displaying imported resources, so I guess all we need is to add a flag when calling createChangeset
API here:
aws-cdk/packages/aws-cdk/lib/api/util/cloudformation.ts
Lines 469 to 482 in bbdd42c
Just like here:
aws-cdk/packages/aws-cdk/lib/api/deploy-stack.ts
Lines 541 to 550 in bbdd42c
Other Information
Currently it is possible to review the changeset before an actual deployment as described here, but it is not very handy.
aws-cdk/packages/aws-cdk/README.md
Lines 415 to 420 in 3a37256
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
CDK version used
2.174.1
Environment details (OS name and version, etc.)
macOS