-
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
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
Comments
tmokmss
added
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
labels
Nov 18, 2023
pahud
added
p2
effort/medium
Medium work item – several days of effort
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Nov 21, 2023
This issue has received a significant amount of attention so we are automatically upgrading its priority. A member of the community will see the re-prioritization and provide an update on the issue. |
1 task
1 task
mergify bot
pushed a commit
that referenced
this issue
Jan 1, 2025
### Issue # (if applicable) Closes #28060. ### Reason for this change This feature allows to 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, cdk migrate, etc, it would benefit many potential users if cdk natively support it. ### Description of changes This PR adds a CLI option --import-exsting-resources: boolean to cdk deploy command and pass it to createChangeSet API call. ### Description of how you validated changes Added a cli integ test. ### Checklist - [X] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) Co-authored-by: Masashi Tomooka [[email protected]](mailto:[email protected]) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Comments on closed issues and PRs are hard for our team to see. |
iankhou
pushed a commit
that referenced
this issue
Jan 13, 2025
### Issue # (if applicable) Closes #28060. ### Reason for this change This feature allows to 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, cdk migrate, etc, it would benefit many potential users if cdk natively support it. ### Description of changes This PR adds a CLI option --import-exsting-resources: boolean to cdk deploy command and pass it to createChangeSet API call. ### Description of how you validated changes Added a cli integ test. ### Checklist - [X] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) Co-authored-by: Masashi Tomooka [[email protected]](mailto:[email protected]) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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: