Skip to content

Commit 2d092f2

Browse files
authored
chore(pipelines): clarify when not to use the modern synthesis flag (#18873)
Closes #18572. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent b241ba1 commit 2d092f2

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

packages/@aws-cdk/pipelines/README.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -944,22 +944,30 @@ or future deployments to this environment will fail. If you want to upgrade
944944
the bootstrap stack to a newer version, do that by updating it in-place.
945945

946946
> This library requires the *modern* bootstrapping stack which has
947-
> been updated specifically to support cross-account continuous delivery. Starting,
948-
> in CDK v2 this new bootstrapping stack will become the default, but for now it is still
949-
> opt-in.
947+
> been updated specifically to support cross-account continuous delivery.
950948
>
951-
> The commands below assume you are running `cdk bootstrap` in a directory
952-
> where `cdk.json` contains the `"@aws-cdk/core:newStyleStackSynthesis": true`
953-
> setting in its context, which will switch to the new bootstrapping stack
954-
> automatically.
949+
> If you are using CDKv2, you do not need to do anything else. Modern
950+
> bootstrapping and modern stack synthesis (also known as "default stack
951+
> synthesis") is the default.
955952
>
956-
> If run from another directory, be sure to run the bootstrap command with
957-
> the environment variable `CDK_NEW_BOOTSTRAP=1` set.
953+
> If you are using CDKv1, you need to opt in to modern bootstrapping and
954+
> modern stack synthesis using a feature flag. Make sure `cdk.json` includes:
955+
>
956+
> ```json
957+
> {
958+
> "context": {
959+
> "@aws-cdk/core:newStyleStackSynthesis": true
960+
> }
961+
> }
962+
> ```
963+
>
964+
> And be sure to run `cdk bootstrap` in the same directory as the `cdk.json`
965+
> file.
958966
959967
To bootstrap an environment for provisioning the pipeline:
960968
961969
```console
962-
$ env CDK_NEW_BOOTSTRAP=1 npx cdk bootstrap \
970+
$ npx cdk bootstrap \
963971
[--profile admin-profile-1] \
964972
--cloudformation-execution-policies arn:aws:iam::aws:policy/AdministratorAccess \
965973
aws://111111111111/us-east-1
@@ -969,7 +977,7 @@ To bootstrap a different environment for deploying CDK applications into using
969977
a pipeline in account `111111111111`:
970978

971979
```console
972-
$ env CDK_NEW_BOOTSTRAP=1 npx cdk bootstrap \
980+
$ npx cdk bootstrap \
973981
[--profile admin-profile-2] \
974982
--cloudformation-execution-policies arn:aws:iam::aws:policy/AdministratorAccess \
975983
--trust 11111111111 \
@@ -980,7 +988,7 @@ If you only want to trust an account to do lookups (e.g, when your CDK applicati
980988
`Vpc.fromLookup()` call), use the option `--trust-for-lookup`:
981989

982990
```console
983-
$ env CDK_NEW_BOOTSTRAP=1 npx cdk bootstrap \
991+
$ npx cdk bootstrap \
984992
[--profile admin-profile-2] \
985993
--cloudformation-execution-policies arn:aws:iam::aws:policy/AdministratorAccess \
986994
--trust-for-lookup 11111111111 \

0 commit comments

Comments
 (0)