aws-cdk 2.1015.0 → 2.1016.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/build-info.json +2 -2
- package/lib/cli/cdk-toolkit.d.ts +6 -0
- package/lib/cli/cdk-toolkit.js +5 -1
- package/lib/cli/cli-config.js +2 -1
- package/lib/cli/cli.js +2 -1
- package/lib/cli/convert-to-user-input.js +3 -1
- package/lib/cli/parse-command-line-arguments.js +6 -1
- package/lib/cli/user-input.d.ts +6 -0
- package/lib/cli/user-input.js +1 -1
- package/lib/index.js +23 -8
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -189,6 +189,23 @@ The `change-set` flag will make `diff` create a change set and extract resource
|
|
|
189
189
|
The `--no-change-set` mode will consider any change to a property that requires replacement to be a resource replacement,
|
|
190
190
|
even if the change is purely cosmetic (like replacing a resource reference with a hardcoded arn).
|
|
191
191
|
|
|
192
|
+
The `--import-existing-resources` option will make `diff` create a change set and compare it using
|
|
193
|
+
the CloudFormation resource import mechanism. This allows CDK to detect changes and show report of resources that
|
|
194
|
+
will be imported rather added. Use this flag when preparing to import existing resources into a CDK stack to
|
|
195
|
+
ensure and validate the changes are correctly reflected by showing 'import'.
|
|
196
|
+
|
|
197
|
+
```console
|
|
198
|
+
$ cdk diff
|
|
199
|
+
[+] AWS::DynamoDB::GlobalTable MyGlobalTable MyGlobalTable5DC12DB4
|
|
200
|
+
|
|
201
|
+
$ cdk diff --import-existing-resources
|
|
202
|
+
[←] AWS::DynamoDB::GlobalTable MyGlobalTable MyGlobalTable5DC12DB4 import
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
In the output above:
|
|
206
|
+
[+] indicates a new resource that would be created.
|
|
207
|
+
[←] indicates a resource that would be imported into the stack instead.
|
|
208
|
+
|
|
192
209
|
### `cdk deploy`
|
|
193
210
|
|
|
194
211
|
Deploys a stack of your CDK app to its environment. During the deployment, the toolkit will output progress
|
package/build-info.json
CHANGED
package/lib/cli/cdk-toolkit.d.ts
CHANGED
|
@@ -227,6 +227,12 @@ export interface DiffOptions {
|
|
|
227
227
|
* @default true
|
|
228
228
|
*/
|
|
229
229
|
readonly changeSet?: boolean;
|
|
230
|
+
/**
|
|
231
|
+
* Whether or not the change set imports resources that already exist.
|
|
232
|
+
*
|
|
233
|
+
* @default false
|
|
234
|
+
*/
|
|
235
|
+
readonly importExistingResources?: boolean;
|
|
230
236
|
}
|
|
231
237
|
interface CfnDeployOptions {
|
|
232
238
|
/**
|