aws-cdk 2.1028.0 → 2.1029.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 +13 -3
- package/build-info.json +2 -2
- package/lib/cli/cdk-toolkit.d.ts +9 -1
- package/lib/cli/cdk-toolkit.js +3 -1
- package/lib/cli/cli-config.js +7 -2
- package/lib/cli/cli-type-registry.json +5 -0
- package/lib/cli/cli.js +34 -3
- package/lib/cli/convert-to-user-input.js +3 -1
- package/lib/cli/parse-command-line-arguments.js +7 -2
- package/lib/cli/user-input.d.ts +6 -0
- package/lib/cli/user-input.js +1 -1
- package/lib/cli/util/yargs-helpers.d.ts +0 -10
- package/lib/cli/util/yargs-helpers.js +3 -18
- package/lib/commands/flag-operations.js +6 -2
- package/lib/index.js +381 -90
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1131,13 +1131,17 @@ apply the refactor on your CloudFormation stacks. But for now, only the dry-run
|
|
|
1131
1131
|
mode is supported.
|
|
1132
1132
|
|
|
1133
1133
|
If your application has more than one stack, and you want the `refactor`
|
|
1134
|
-
command to consider only a subset of them, you can
|
|
1135
|
-
|
|
1134
|
+
command to consider only a subset of them, you can specify the stacks you
|
|
1135
|
+
want, both local and deployed:
|
|
1136
1136
|
|
|
1137
1137
|
```shell
|
|
1138
|
-
$ cdk refactor
|
|
1138
|
+
$ cdk refactor --local-stack Foo --local-stack Bar --deployed-stack Foo --unstable=refactor --dry-run
|
|
1139
1139
|
```
|
|
1140
1140
|
|
|
1141
|
+
This is useful if, for example, you have more than one CDK application deployed
|
|
1142
|
+
to a given environment, and you want to only include the deployed stacks that
|
|
1143
|
+
belong to the application that you are refactoring.
|
|
1144
|
+
|
|
1141
1145
|
The pattern language is the same as the one used in the `cdk deploy` command.
|
|
1142
1146
|
However, unlike `cdk deploy`, in the absence of this parameter, all stacks are
|
|
1143
1147
|
considered.
|
|
@@ -1191,6 +1195,12 @@ resource currently deployed, while the destination must refer to a location
|
|
|
1191
1195
|
that is not already occupied by any resource.
|
|
1192
1196
|
|
|
1193
1197
|
|
|
1198
|
+
#### Limitations
|
|
1199
|
+
- A refactor cannot leave a stack empty. This is a CloudFormation API limitation,
|
|
1200
|
+
that also applies to deployments.
|
|
1201
|
+
- Creation of new stacks during a refactor is not supported. If you need to
|
|
1202
|
+
create a new stack, do it in a separate deployment, previous to refactoring.
|
|
1203
|
+
|
|
1194
1204
|
### `cdk drift`
|
|
1195
1205
|
|
|
1196
1206
|
Checks if there is any drift in your stack or stacks. If you need the command
|
package/build-info.json
CHANGED
package/lib/cli/cdk-toolkit.d.ts
CHANGED
|
@@ -644,11 +644,15 @@ export interface RefactorOptions {
|
|
|
644
644
|
*/
|
|
645
645
|
overrideFile?: string;
|
|
646
646
|
/**
|
|
647
|
-
* Modifies the behavior of the `
|
|
647
|
+
* Modifies the behavior of the `overrideFile` option by swapping source and
|
|
648
648
|
* destination locations. This is useful when you want to undo a refactor
|
|
649
649
|
* that was previously applied.
|
|
650
650
|
*/
|
|
651
651
|
revert?: boolean;
|
|
652
|
+
/**
|
|
653
|
+
* Whether to do the refactor without prompting the user for confirmation.
|
|
654
|
+
*/
|
|
655
|
+
force?: boolean;
|
|
652
656
|
/**
|
|
653
657
|
* Criteria for selecting stacks to compare with the deployed stacks in the
|
|
654
658
|
* target environment.
|
|
@@ -658,6 +662,10 @@ export interface RefactorOptions {
|
|
|
658
662
|
* A list of names of additional deployed stacks to be included in the comparison.
|
|
659
663
|
*/
|
|
660
664
|
additionalStackNames?: string[];
|
|
665
|
+
/**
|
|
666
|
+
* Role to assume in the target environment before performing the refactor.
|
|
667
|
+
*/
|
|
668
|
+
roleArn?: string;
|
|
661
669
|
}
|
|
662
670
|
/**
|
|
663
671
|
* Options for the drift command
|