---
title: "Cloud options | Grafana Cloud documentation"
description: "Test execution in Grafana Cloud k6 includes additional configuration options, such as running a test on a specific project, leveraging multiple load zones, and using static IPs."
---

# Cloud options

When executing a k6 test, you can run them locally, or in the cloud. When running tests on Grafana Cloud, you have access to additional configuration options that you can define in the `options` object, such as load zones, or static IP addresses.

These configuration options are **optional**.

> Note
> 
> This page only covers cloud options. For more information about all available options parameters, refer to [Options](/docs/k6/latest/using-k6/k6-options/).

## Example

In your test script, you can configure cloud options by using the `options.cloud` object:

JavaScript ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```javascript
export const options = {
  cloud: {
    name: 'Hello k6 cloud!',
    stackID: 123456,
    projectID: 123456,
    staticIPs: true,
    drop_metrics: ['http_req_tls_handshaking', 'http_req_waiting', 'http_req_connecting'],
    drop_tags: { '*': ['instance_id'] },
    keep_tags: { http_req_waiting: ['instance_id'] },
    distribution: {
      distributionLabel1: { loadZone: 'amazon:us:ashburn', percent: 50 },
      distributionLabel2: { loadZone: 'amazon:ie:dublin', percent: 50 },
    },
    note: 'Anything that may be worth noting about your test.',
  },
};
```

## Options and syntax

Expand table

| Name                          | Default                                                                                | Description                                                                                                                                                                                                                                                                                                  |
|-------------------------------|----------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| name (string)                 | The name of the main script file, so something like `script.js`.                       | The name of the test in the k6 Cloud UI. Test runs with the same name will be grouped.                                                                                                                                                                                                                       |
| stackID (number)              | Empty.                                                                                 | The ID of the stack where the test is sent in k6 Cloud. Available in k6 v1.6.0 and later.                                                                                                                                                                                                                    |
| projectID (number)            | Empty.                                                                                 | The ID of the project where the test is assigned in k6 Cloud.                                                                                                                                                                                                                                                |
| distribution (object)         | The equivalent of `someDefaultLabel: { loadZone: "amazon:us:ashburn", percent: 100 }`. | How the traffic distributes across existing [Load Zones](/docs/grafana-cloud/testing/k6/author-run/use-load-zones/). The keys are string labels that will be injected as environment variables.                                                                                                              |
| staticIPs (boolean)           | `false` by default                                                                     | When set to `true`, k6 will use dedicated IPs assigned to your organization to execute the test. Refer to [Cloud IPs](/docs/grafana-cloud/testing/k6/reference/cloud-ips/) for more details.                                                                                                                 |
| note (string)                 | Empty by default.                                                                      | Notes regarding the test, changes made, or anything to note about your test.                                                                                                                                                                                                                                 |
| deleteSensitiveData (boolean) | `false` by default                                                                     | If `true`, k6 deletes sensitive data as soon as the test starts running or, if still queued, when the test aborts. Sensitive data includes scripts, HAR files, archives, and APM credentials.                                                                                                                |
| drop\_metrics (array)         | Empty by default                                                                       | Drops the metrics listed in the array during ingestion time. E.g. `["http_req_tls_handshaking"]`. This helps reduce the cardinality of time series. Note [some metrics are required and can’t be dropped](#options-to-reduce-time-series).                                                                   |
| drop\_tags (object)           | {"\*": \[“instance\_id”]}                                                              | Drops tags for a specified metric, where the metric is the key and the tags are an array. E.g. `{"http_req_duration": ["instance_id"]}`. This helps reduce the cardinality of time series. The wildcard `*` can be used to drop specific tags on every metric.                                               |
| keep\_tags (object)           | Empty by default                                                                       | Keeps tags for a specified metric, where the metric is the key and the tags are an array. E.g. `{"http_req_duration": ["instance_id"]}`. This helps reduce the cardinality of time series. The wildcard `*` can be used to drop specific tags on every metric. This option takes precedence over drop\_tags. |

> Note
> 
> The `deleteSensitiveData` option is unavailable in default subscriptions. If you want to activate it, contact support at [support@k6.io](mailto:support@k6.io).

### Options to reduce time series

The `Too many time series` alert aborts a test run. Sometimes, though, a test might trigger the alert even if the script follows all recommended practices from the performance insight. In these cases, you can consider the `drop_metrics` and `drop_tags` options.

Note that if you use these options, some graphs may appear empty for the metrics deleted.

Certain important tags and metrics can’t be dropped:

- For metrics, you can’t drop `vus`.
- For tags, you can’t drop:
  
  - `instance_id` from `iterations`, `load_generator_cpu_percent`, `load_generator_file_handles`, `load_generator_memory_percent`, `vus`, and `vus_max`.
  - `test_run_id`.
