diff --git a/packages/aws-cdk/README.md b/packages/aws-cdk/README.md index 99b02ec187665..05948cd497295 100644 --- a/packages/aws-cdk/README.md +++ b/packages/aws-cdk/README.md @@ -895,7 +895,10 @@ cdk bootstrap --no-previous-parameters CDK Garbage Collection. > [!CAUTION] -> CDK Garbage Collection is under development and therefore must be opted in via the `--unstable` flag: `cdk gc --unstable=gc`. +> CDK Garbage Collection is under development and therefore must be opted in via the +>`--unstable` flag: `cdk gc --unstable=gc`. `--unstable` indicates that the scope and +> API of feature might still change. Otherwise the feature is generally production +> ready and fully supported. `cdk gc` garbage collects unused assets from your bootstrap bucket via the following mechanism: diff --git a/packages/aws-cdk/lib/cli.ts b/packages/aws-cdk/lib/cli.ts index 1cc58f1312435..e90062fb4048d 100644 --- a/packages/aws-cdk/lib/cli.ts +++ b/packages/aws-cdk/lib/cli.ts @@ -115,7 +115,7 @@ async function parseCommandLineArguments(args: string[]) { .option('template', { type: 'string', requiresArg: true, desc: 'Use the template from the given file instead of the built-in one (use --show-template to obtain an example)' }) .option('previous-parameters', { type: 'boolean', default: true, desc: 'Use previous values for existing parameters (you must specify all parameters on every deployment if this is disabled)' }), ) - .command('gc [ENVIRONMENTS..]', 'Garbage collect assets', (yargs: Argv) => yargs + .command('gc [ENVIRONMENTS..]', 'Garbage collect assets. Options detailed here: https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk/README.md#cdk-gc', (yargs: Argv) => yargs .option('action', { type: 'string', desc: 'The action (or sub-action) you want to perform. Valid entires are "print", "tag", "delete-tagged", "full".', default: 'full' }) .option('type', { type: 'string', desc: 'Specify either ecr, s3, or all', default: 'all' }) .option('rollback-buffer-days', { type: 'number', desc: 'Delete assets that have been marked as isolated for this many days', default: 0 })