cli: support CloudFormation simplified resource import #28060
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
Describe the feature
On Nov 17 2023, a new feature was announced: AWS CloudFormation simplifies resource import with a new parameter for ChangeSets.
https://aws.amazon.com/about-aws/whats-new/2023/11/aws-cloudformation-import-parameter-changesets/
Summary:
AWS CloudFormation's new ImportExistingResources parameter for CreateChangeSet API automatically imports existing resources in the template during deployments. It identifies resources using custom names, avoiding errors from naming conflicts. This reduces manual effort as a separate resource name document is no longer needed. ImportExistingResources allows importing existing resources and deploying changes in a single ChangeSet.
Use Case
Automatically import exsting resources with the same physical name, such as S3 bucket, DDB table, etc, during a CFn deployment.
Because resource import is a vital feature for CDK users e.g. to refactor a construct tree, it would benefit many potential users if cdk natively support it.
Proposed Solution
This feature introduced a new request parameter
ImportExstingResources
to theCreateChangeSet
API. So I guess we can add a CLI option like--import-exsting-resources: boolean
tocdk deploy
command to enable the new feature.The API is called here:
aws-cdk/packages/aws-cdk/lib/api/deploy-stack.ts
Lines 410 to 418 in c66e197
Other Information
No response
Acknowledgements
CDK version used
2.110.0
Environment details (OS name and version, etc.)
macOS
The text was updated successfully, but these errors were encountered: