You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: v2/cli.md
+16-5Lines changed: 16 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -89,15 +89,21 @@ CDKMetadata:
89
89
90
90
The `Analytics` property is a gzipped, base64\-encoded, prefix\-encoded list of the constructs in the stack\.
91
91
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<aname="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:
94
98
95
99
```
96
-
cdk --no-version-reporting synth
100
+
$ cdk synth --no-version-reporting
97
101
```
98
102
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:
101
107
102
108
```
103
109
{
@@ -106,6 +112,11 @@ To opt out of version reporting, use one of the following methods:
106
112
}
107
113
```
108
114
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
+
109
120
## Authentication with AWS<aname="cli_auth"></a>
110
121
111
122
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