From 1057ef0feba8f35ea5d7dc0f011e85e721146ce0 Mon Sep 17 00:00:00 2001 From: Rico Hermans Date: Wed, 4 Oct 2023 12:15:46 +0200 Subject: [PATCH] feat(cli): declare `cdk import` stable (#27390) The `cdk import` feature has existed for a year and a half. Since then, we've only had one major bug report around multiple identifiers (#20895) which was fixed half a year ago. This feature seems solid enough to remove the "Preview" label. There is only one remaining limitation around Nested Stacks, but this feature could be addressed without breaking backwards compatibility. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/aws-cdk/README.md | 18 +++++++++--------- packages/aws-cdk/lib/cdk-toolkit.ts | 1 - 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/aws-cdk/README.md b/packages/aws-cdk/README.md index 3d892f84f1c94..cddc762c450da 100644 --- a/packages/aws-cdk/README.md +++ b/packages/aws-cdk/README.md @@ -431,7 +431,7 @@ For this reason, only use it for development purposes. **⚠ Note #2**: This command is considered experimental, and might have breaking changes in the future. -**⚠ Note #3**: Expected defaults for certain parameters may be different with the hotswap parameter. For example, an ECS service's minimum healthy percentage will currently be set to 0. Please review the source accordingly if this occurs. +**⚠ Note #3**: Expected defaults for certain parameters may be different with the hotswap parameter. For example, an ECS service's minimum healthy percentage will currently be set to 0. Please review the source accordingly if this occurs. ### `cdk watch` @@ -548,17 +548,17 @@ To import an existing resource to a CDK stack, follow the following steps: #### Limitations -This feature is currently in preview. Be aware of the following limitations: +This feature currently has the following limitations: -- Importing resources in nested stacks is not possible. -- Uses the deploy role credentials (necessary to read the encrypted staging - bucket). Requires a new version (version 12) of the bootstrap stack, for the added - IAM permissions to the `deploy-role`. +- Importing resources into nested stacks is not possible. - There is no check on whether the properties you specify are correct and complete for the imported resource. Try starting a drift detection operation after importing. - Resources that depend on other resources must all be imported together, or one-by-one - in the right order. The CLI will not help you import dependent resources in the right - order, the CloudFormation deployment will fail with unresolved references. + in the right order. If you do not, the CloudFormation deployment will fail + with unresolved references. +- Uses the deploy role credentials (necessary to read the encrypted staging + bucket). Requires version 12 of the bootstrap stack, for the added + IAM permissions to the `deploy-role`. ### `cdk destroy` @@ -619,7 +619,7 @@ boundaries see the [Security And Safety Dev Guide](https://github.com/aws/aws-cd Once a bootstrap template has been deployed with a set of parameters, you must use the `--no-previous-parameters` CLI flag to change any of these parameters on -future deployments. +future deployments. > **Note** Please note that when you use this flag, you must resupply >*all* previously supplied parameters. diff --git a/packages/aws-cdk/lib/cdk-toolkit.ts b/packages/aws-cdk/lib/cdk-toolkit.ts index 52b458f692ffa..0ab13f0261412 100644 --- a/packages/aws-cdk/lib/cdk-toolkit.ts +++ b/packages/aws-cdk/lib/cdk-toolkit.ts @@ -479,7 +479,6 @@ export class CdkToolkit { } public async import(options: ImportOptions) { - print(chalk.grey("The 'cdk import' feature is currently in preview.")); const stacks = await this.selectStacksForDeploy(options.selector, true, true); if (stacks.stackCount > 1) {