Skip to content

Commit eee2d79

Browse files
committed
Update: Add '--import-existing-resources' cdk deploy command option
1 parent a9776b0 commit eee2d79

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

v2/ref-cli-cmd-deploy.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,15 @@ Perform a deployment even if your CDK app doesn’t contain any stacks\.
9696
This option is helpful in the following scenario: You may have an app with multiple environments, such as `dev` and `prod`\. When starting development, your prod app may not have any resources, or the resources may be commented out\. This will result in a deployment error with a message stating that the app has no stacks\. Use `--ignore-no-stacks` to bypass this error\.
9797
*Default value*: `false`
9898

99+
`--import-existing-resources BOOLEAN` <a name="ref-cli-cmd-deploy-options-import-existing-resources"></a>
100+
Import existing, unmanaged AWS CloudFormation resources from your AWS account\.
101+
When you use this option, resources from your synthesized AWS CloudFormation template with the same custom name as existing unmanaged resources in the same account will be imported into your stack\.
102+
You can use this option to import existing resources into new or existing stacks\.
103+
You can import existing resources and deploy new resources in the same `cdk deploy` command\.
104+
To learn more about custom names, see [Name type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html) in the *AWS CloudFormation User Guide*\.
105+
To learn more about the `ImportExistingResources` CloudFormation parameter, see [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/)\.
106+
For more information on using this option, see [Import existing resources](https://github.com/aws/aws-cdk-cli/tree/main/packages/aws-cdk#import-existing-resources) in the *aws\-cdk\-cli GitHub repository*\.
107+
99108
`--logs BOOLEAN` <a name="ref-cli-cmd-deploy-options-logs"></a>
100109
Show Amazon CloudWatch log in the standard output \(`stdout`\) for all events from all resources in the selected stacks\.
101110
This option is only compatible with `--watch`\.

0 commit comments

Comments
 (0)