Skip to content

Commit d4e0cf6

Browse files
committed
Update: Add note on opting out of version reporting
1 parent 2da5851 commit d4e0cf6

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

v2/cli.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,21 @@ CDKMetadata:
8989

9090
The `Analytics` property is a gzipped, base64\-encoded, prefix\-encoded list of the constructs in the stack\.
9191

92-
To opt out of version reporting, use one of the following methods:
93-
+ Use the cdk command with the \-\-no\-version\-reporting argument to opt out for a single command\.
92+
### Opt out of version reporting<a name="version_reporting_out"></a>
93+
94+
You can opt out of version reporting by using the CDK CLI or by configuring your project's `cdk.json` file\.
95+
96+
**To opt out of version reporting using the CDK CLI**
97+
+ Use the `--no-version-reporting` option with any CDK CLI command to opt out for a single command\. The following is an example of opting out during template synthesis:
9498

9599
```
96-
cdk --no-version-reporting synth
100+
$ cdk synth --no-version-reporting
97101
```
98102

99-
Remember, the CDK CLI synthesizes fresh templates before deploying, so you should also add `--no-version-reporting` to `cdk deploy` commands\.
100-
+ Set versionReporting to **false** in `./cdk.json` or `~/.cdk.json`\. This opts out unless you opt in by specifying `--version-reporting` on an individual command\.
103+
Since the AWS CDK synthesizes templates automatically when you run `cdk deploy`, you should also use `--no-version-reporting` with the `cdk deploy` command\.
104+
105+
**To opt out of version reporting by configuring the `cdk.json` file**
106+
+ Set `versionReporting` to `false` in `./cdk.json` or `~/.cdk.json`\. This opts you out by default\. The following is an example:
101107

102108
```
103109
{
@@ -106,6 +112,11 @@ To opt out of version reporting, use one of the following methods:
106112
}
107113
```
108114

115+
After configuring, you can override this behavior and opt in by specifying `--version-reporting` on an individual command\.
116+
117+
**Note**
118+
When you opt out of version reporting, the AWS CDK will not collect or report data on which constructs you are using\. Because of this, the AWS CDK will not be able to identify if you've been impacted by security issues and will not send you notifications for them\.
119+
109120
## Authentication with AWS<a name="cli_auth"></a>
110121

111122
There are different ways in which you can configure programmatic access to AWS resources, depending on the environment and the AWS access available to you\.

0 commit comments

Comments
 (0)