aws-cdk 2.1115.1 → 2.1117.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 +48 -22
- package/build-info.json +2 -2
- package/lib/api/bootstrap/bootstrap-template.yaml +4 -2
- package/lib/cli/cdk-toolkit.d.ts +2 -1
- package/lib/cli/cdk-toolkit.js +9 -6
- package/lib/cli/cli-config.js +14 -1
- package/lib/cli/cli-type-registry.json +31 -0
- package/lib/cli/cli.js +21 -1
- package/lib/cli/convert-to-user-input.js +17 -1
- package/lib/cli/parse-command-line-arguments.js +25 -1
- package/lib/cli/user-configuration.d.ts +1 -0
- package/lib/cli/user-configuration.js +3 -1
- package/lib/cli/user-input.d.ts +43 -0
- package/lib/cli/user-input.js +1 -1
- package/lib/index.js +478 -162
- package/lib/init-templates/.init-version.json +1 -1
- package/package.json +5 -8
package/README.md
CHANGED
|
@@ -11,28 +11,29 @@
|
|
|
11
11
|
|
|
12
12
|
The AWS CDK Toolkit provides the `cdk` command-line interface that can be used to work with AWS CDK applications. This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.
|
|
13
13
|
|
|
14
|
-
| Command
|
|
15
|
-
|
|
|
16
|
-
| [`cdk docs`](#cdk-docs)
|
|
17
|
-
| [`cdk init`](#cdk-init)
|
|
18
|
-
| [`cdk list`](#cdk-list)
|
|
19
|
-
| [`cdk synth`](#cdk-synth)
|
|
20
|
-
| [`cdk diff`](#cdk-diff)
|
|
21
|
-
| [`cdk deploy`](#cdk-deploy)
|
|
22
|
-
| [`cdk
|
|
23
|
-
| [`cdk
|
|
24
|
-
| [`cdk
|
|
25
|
-
| [`cdk
|
|
26
|
-
| [`cdk
|
|
27
|
-
| [`cdk
|
|
28
|
-
| [`cdk
|
|
29
|
-
| [`cdk
|
|
30
|
-
| [`cdk
|
|
31
|
-
| [`cdk
|
|
32
|
-
| [`cdk
|
|
33
|
-
| [`cdk
|
|
34
|
-
| [`cdk
|
|
35
|
-
| [`cdk
|
|
14
|
+
| Command | Description |
|
|
15
|
+
| ------------------------------------------- | --------------------------------------------------------------------------------- |
|
|
16
|
+
| [`cdk docs`](#cdk-docs) | Access the online documentation |
|
|
17
|
+
| [`cdk init`](#cdk-init) | Start a new CDK project (app or library) |
|
|
18
|
+
| [`cdk list`](#cdk-list) | List stacks and their dependencies in an application |
|
|
19
|
+
| [`cdk synth`](#cdk-synth) | Synthesize a CDK app to CloudFormation template(s) |
|
|
20
|
+
| [`cdk diff`](#cdk-diff) | Diff stacks against current state |
|
|
21
|
+
| [`cdk deploy`](#cdk-deploy) | Deploy a stack into an AWS account |
|
|
22
|
+
| [`cdk publish-assets`](#cdk-publish-assets) | Publish assets for stack(s) without deploying |
|
|
23
|
+
| [`cdk rollback`](#cdk-rollback) | Roll back a failed deployment |
|
|
24
|
+
| [`cdk import`](#cdk-import) | Import existing AWS resources into a CDK stack |
|
|
25
|
+
| [`cdk migrate`](#cdk-migrate) | Migrate AWS resources, CloudFormation stacks, and CloudFormation templates to CDK |
|
|
26
|
+
| [`cdk watch`](#cdk-watch) | Watches a CDK app for deployable and hotswappable changes |
|
|
27
|
+
| [`cdk destroy`](#cdk-destroy) | Deletes a stack from an AWS account |
|
|
28
|
+
| [`cdk bootstrap`](#cdk-bootstrap) | Deploy a toolkit stack to support deploying large stacks & artifacts |
|
|
29
|
+
| [`cdk gc`](#cdk-gc) | Garbage collect assets associated with the bootstrapped stack |
|
|
30
|
+
| [`cdk doctor`](#cdk-doctor) | Inspect the environment and produce information useful for troubleshooting |
|
|
31
|
+
| [`cdk acknowledge`](#cdk-acknowledge) | Acknowledge (and hide) a notice by issue number |
|
|
32
|
+
| [`cdk notices`](#cdk-notices) | List all relevant notices for the application |
|
|
33
|
+
| [`cdk refactor`](#cdk-refactor) | Moves resources between stacks or within the same stack |
|
|
34
|
+
| [`cdk drift`](#cdk-drift) | Detect drifts in the given CloudFormation stack(s) |
|
|
35
|
+
| [`cdk cli-telemetry`](#cdk-cli-telemetry) | Enable or disable cli telemetry collection |
|
|
36
|
+
| [`cdk flags`](#cdk-flags) | View and modify your feature flag configurations |
|
|
36
37
|
|
|
37
38
|
## Common topics
|
|
38
39
|
|
|
@@ -615,6 +616,31 @@ For technical implementation details (function calls, file locations), see [docs
|
|
|
615
616
|
|
|
616
617
|

|
|
617
618
|
|
|
619
|
+
### `cdk publish-assets`
|
|
620
|
+
|
|
621
|
+
Publishes assets for the specified stack(s) without performing a deployment.
|
|
622
|
+
|
|
623
|
+
> [!CAUTION]
|
|
624
|
+
> `cdk publish-assets` is under development and therefore must be opted in via the
|
|
625
|
+
> `--unstable` flag: `cdk publish-assets --unstable=publish-assets`. `--unstable` indicates that the scope and
|
|
626
|
+
> API of feature might still change. Otherwise the feature is generally production
|
|
627
|
+
> ready and fully supported.
|
|
628
|
+
|
|
629
|
+
Publishes assets (such as Docker images and file assets) for the specified stack(s) to their respective destinations (ECR repositories, S3 buckets) without performing a deployment.
|
|
630
|
+
|
|
631
|
+
This is useful in CI/CD pipelines where you want to separate the asset build/publish phase from the deployment phase.
|
|
632
|
+
|
|
633
|
+
```console
|
|
634
|
+
$ # Publish assets for a single stack
|
|
635
|
+
$ cdk publish-assets MyStack --unstable=publish-assets
|
|
636
|
+
|
|
637
|
+
$ # Publish assets for all stacks
|
|
638
|
+
$ cdk publish-assets --all --unstable=publish-assets
|
|
639
|
+
|
|
640
|
+
$ # Force re-publish even if assets already exist
|
|
641
|
+
$ cdk publish-assets MyStack --unstable=publish-assets --force
|
|
642
|
+
```
|
|
643
|
+
|
|
618
644
|
### `cdk rollback`
|
|
619
645
|
|
|
620
646
|
If a deployment performed using `cdk deploy --no-rollback` fails, your
|
package/build-info.json
CHANGED
|
@@ -688,6 +688,8 @@ Resources:
|
|
|
688
688
|
- sts:GetCallerIdentity
|
|
689
689
|
# `cdk import`
|
|
690
690
|
- cloudformation:GetTemplateSummary
|
|
691
|
+
# `cdk deploy` CloudFormation Hook annotation display on hook failure
|
|
692
|
+
- cloudformation:GetHookResult
|
|
691
693
|
Resource: "*"
|
|
692
694
|
Effect: Allow
|
|
693
695
|
- Sid: CliStagingBucket
|
|
@@ -815,7 +817,7 @@ Resources:
|
|
|
815
817
|
Name:
|
|
816
818
|
Fn::Sub: '/cdk-bootstrap/${Qualifier}/version'
|
|
817
819
|
# Also update this value below (see comment there)
|
|
818
|
-
Value: '
|
|
820
|
+
Value: '31'
|
|
819
821
|
Outputs:
|
|
820
822
|
BucketName:
|
|
821
823
|
Description: The name of the S3 bucket owned by the CDK toolkit stack
|
|
@@ -850,4 +852,4 @@ Outputs:
|
|
|
850
852
|
# {Fn::GetAtt} on an SSM Parameter is eventually consistent, and can fail with "parameter
|
|
851
853
|
# doesn't exist" even after just having been created. To reduce our deploy failure rate, we
|
|
852
854
|
# duplicate the value here and use a build-time test to ensure the two values are the same.
|
|
853
|
-
Value: '
|
|
855
|
+
Value: '31'
|
package/lib/cli/cdk-toolkit.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RequireApproval } from '@aws-cdk/cloud-assembly-schema';
|
|
2
|
-
import type { DeploymentMethod, ToolkitOptions } from '@aws-cdk/toolkit-lib';
|
|
2
|
+
import type { DeploymentMethod, PublishAssetsOptions, ToolkitOptions } from '@aws-cdk/toolkit-lib';
|
|
3
3
|
import { Toolkit } from '@aws-cdk/toolkit-lib';
|
|
4
4
|
import { CliIoHost } from './io-host';
|
|
5
5
|
import type { Configuration } from './user-configuration';
|
|
@@ -115,6 +115,7 @@ export declare class CdkToolkit {
|
|
|
115
115
|
* Roll back the given stack or stacks.
|
|
116
116
|
*/
|
|
117
117
|
rollback(options: RollbackOptions): Promise<void>;
|
|
118
|
+
publishAssets(options: PublishAssetsOptions): Promise<void>;
|
|
118
119
|
watch(options: WatchOptions): Promise<void>;
|
|
119
120
|
import(options: ImportOptions): Promise<void>;
|
|
120
121
|
destroy(options: DestroyOptions): Promise<void>;
|