Skip to content

Commit 618ce1e

Browse files
authored
In cockroachcloud/export-metrics-advanced.md, added steps for optional external_id. (#19695)
1 parent e36db0a commit 618ce1e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/current/cockroachcloud/export-metrics-advanced.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ Perform the following steps to enable metrics export from your CockroachDB {{ si
8989
1. Select **Roles** and click **Create role**.
9090
1. For **Trusted entity type**, select **AWS account**.
9191
1. Choose **Another AWS account**.
92-
1. For **Account ID**, provide the CockroachDB {{ site.data.products.advanced }} cloud provider account ID from step 3.
92+
1. For **Account ID**, provide the CockroachDB {{ site.data.products.advanced }} cloud provider account ID from step 3.
93+
1. (Optional) Select the option to **Require external ID**, and for the value of **External ID**, provide a string determined by your security policy. If **External ID** is set, you **must** include it in the `POST` command in Step 8.
9394
1. Finish creating the IAM role with a suitable name. These instructions will use the role name `CockroachCloudMetricsExportRole`. You do not need to add any permissions.
9495

9596
{{site.data.alerts.callout_info}}
@@ -139,7 +140,7 @@ Perform the following steps to enable metrics export from your CockroachDB {{ si
139140
curl --request POST \
140141
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/metricexport/cloudwatch \
141142
--header "Authorization: Bearer {secret_key}" \
142-
--data '{"target_region": "{aws_region}", "role_arn": "arn:aws:iam::{role_arn}:role/CockroachCloudMetricsExportRole", "log_group_name": "{log_group_name}"}'
143+
--data '{"target_region": "{aws_region}", "role_arn": "arn:aws:iam::{role_arn}:role/CockroachCloudMetricsExportRole", "log_group_name": "{log_group_name}", "external_id": "{external_id}"}'
143144
~~~
144145

145146
Where:
@@ -148,6 +149,7 @@ Perform the following steps to enable metrics export from your CockroachDB {{ si
148149
- `{aws_region}` is your AWS region, like `us-east-1`.
149150
- `{role_arn}` is the ARN for the `CockroachCloudMetricsExportRole` role you copied in step 7. If you used a different role name there, be sure to use your role name in place of `CockroachCloudMetricsExportRole` in the above command.
150151
- `{log_group_name}` is the target Amazon CloudWatch log group you created in step 1. This **must** be the same group name you provided in step 6.
152+
- `{external_id}` is the **External ID** specified in the target Amazon cross-account IAM role in step 4.d.b. If specified, this **must** match the string provided in step 4.d.b. If not specified, leave this value empty, for example: `"external_id": ""`.
151153

152154
Specifying an AWS region (to `{aws_region}`) that you do not have a cluster in, or a region that only partially covers your cluster's nodes will result in missing metrics.
153155

0 commit comments

Comments
 (0)