You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Provided template + stack-name is from a deployed stack in the account/region | The CDK application will deploy as a changeset to the existing stack |
642
+
| Provided template has no overlap with resources already in the account/region | The CDK application will deploy a new stack successfully |
643
+
| Provided template has overlap with Cloudformation managed resources already in the account/region | The CDK application will not be deployable unless those resources are removed |
644
+
| Provided template has overlap with unmanaged resources already in the account/region | The CDK application will not be deployable until those resources are adopted with [`cdk import`](#cdk-import)|
645
+
646
+
647
+
##### **The provided template is already deployed to CloudFormation in the account/region**
648
+
649
+
If the provided template came directly from a deployed CloudFormation stack, and that stack has not experienced any drift,
650
+
then the generated application will be immediately deployable, and will not cause any changes to the deployed resources.
651
+
Drift might occur if a resource in your template was modified outside of CloudFormation, namely via the AWS Console or AWS CLI.
652
+
653
+
##### **The provided template is not deployed to CloudFormation in the account/region, and there *is not* overlap with existing resources in the account/region**
654
+
655
+
If the provided template represents a set of resources that have no overlap with resources already deployed in the account/region,
656
+
then the generated application will be immediately deployable. This could be because the stack has never been deployed, or
657
+
the application was generated from a stack deployed in another account/region.
658
+
659
+
In practice this means for any resource in the provided template, for example,
660
+
661
+
```Json
662
+
"S3Bucket": {
663
+
"Type": "AWS::S3::Bucket",
664
+
"Properties": {
665
+
"BucketName": "MyBucket",
666
+
"AccessControl": "PublicRead",
667
+
},
668
+
"DeletionPolicy": "Retain"
669
+
}
670
+
```
671
+
672
+
There must not exist a resource of that type with the same identifier in the desired region. In this example that identfier
673
+
would be "MyBucket"
674
+
675
+
##### **The provided template is not deployed to CloudFormation in the account/region, and there *is* overlap with existing resources in the account/region**
676
+
677
+
If the provided template represents a set of resources that overlap with resources already deployed in the account/region,
678
+
then the generated application will not be immediately deployable. If those overlapped resources are already managed by
679
+
another CloudFormation stack in that account/region, then those resources will need to be manually removed from the provided
680
+
template. Otherwise, if the overlapped resources are not managed by another CloudFormation stack, then first remove those
681
+
resources from your CDK Application Stack, deploy the cdk application successfully, then re-add them and run `cdk import`
682
+
to import them into your deployed stack.
683
+
563
684
### `cdk destroy`
564
685
565
686
Deletes a stack from it's environment. This will cause the resources in the stack to be destroyed (unless they were
0 commit comments