Skip to content

Commit c01e402

Browse files
merge in main updates
2 parents 621c404 + cf4cb5e commit c01e402

27 files changed

+79
-67
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
sitemapExclude: true
3+
---
4+
5+
Add Group variables on the Variables tab in a check group. Group variables are only accessible in the context of a group, which includes the checks within the group and their configuration.
6+
7+
![set group environment variable](/docs/images/browser-checks/group-environment-variables.png)
8+
9+
Add Global variables by clicking "Global variables" on the left-side menu. Global variables are available throughout Checkly, that includes checks, tests, and global configuration options.
10+
11+
![set global environment variable](/docs/images/browser-checks/global-environment-variables.png)
12+
13+
By default, all variables are stored as string values. When using variables, you can click the lock icon to hide the value from all read-only users. Any data you “lock” is encrypted at rest and in flight on our back end and is only decrypted when needed.
14+
15+
Secrets are never visible for any user, and are always encrypted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
sitemapExclude: true
3+
---
4+
5+
## Variables and secrets
6+
There are two ways to store configuration information in Checkly: Variables and secrets. Both variables and secrets are encrypted at rest and in flight.
7+
- **Variables** are used to store non-sensitive information. Variables are shown in plaintext when being edited, on the check result page and in logs. Variables can be accessed via the CLI and API.
8+
- **Secrets** allow you to store sensitive data for use in checks. Once saved secrets are never shown in the UI or in logs. The secret value cannot be accessed via the CLI or API.
9+
10+
From here on, in this document, we refer to both variables and secrets as 'variables' for ease of reading, unless explicitly mentioned.

site/content/docs/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ headerTag="h3"
2828
title="Terraform"
2929
img="/docs/images/icons/integrations.svg"
3030
description="Manage and scale your complete monitoring configuration right from your code base with our official Hashicorp Terraform provider."
31-
link="/docs/integrations/terraform/"
31+
link="/docs/terraform-provider/"
3232
>}}
3333
</div>
3434

site/content/docs/alerting-and-retries/alert-channels.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ Configuring alert channels is mostly self explanatory except for our [advanced w
4747
After adding the channels, you either **edit** or **delete** them, or change which checks are subscribed to that specific channel.
4848

4949
{{<info >}}
50-
If you are using [Terraform](/docs/integrations/terraform), you will need to specify alert channel subscriptions _explicitly_ for each check / group.
50+
If you are using [Terraform](/docs/terraform-provider/), you will need to specify alert channel subscriptions _explicitly_ for each check / group.
5151
{{</info >}}

site/content/docs/alerting-and-retries/phone-calls.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ You can add as many phone number channels as you like.
2121
| Country |
2222
| ------ |
2323
| Australia (+61) |
24+
| Belgium (+32) |
2425
| Brazil (+55) |
2526
| Canada (+1) |
2627
| France (+33) |
2728
| Germany (+49) |
2829
| India (+91) |
2930
| Lithuania (+370) |
31+
| Malta (+356) |
3032
| Netherlands (+31) |
3133
| Norway (+47) |
3234
| Vietnam (+84) |

site/content/docs/alerting-and-retries/webhooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ nutshell, you can:
2020

2121
The example above shows a webhook configured to create a Jira ticket on each event. Notice the following:
2222

23-
- We use the variable `JIRA_INSTANCE_URL` in the URL. We previously stored this variable in the [environment variables section](https://app.checklyhq.com/environment-variables).
23+
- We use the variable `JIRA_INSTANCE_URL` in the URL. We previously stored this variable in the [environment variables section](https://app.checklyhq.com/environment-variables). Alerting configurations only support the use of environment variables, secrets are not supported.
2424
- We use the variable `CHECK_ID` in the payload. This is one of many event-based variables that will change with each call. See below for the complete list.
2525

2626
In both cases we use the familiar Handlebars templating braces, i.e. `{{ }}` to insert the variable.

site/content/docs/api-checks/variables.md

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Environment variables
2+
title: Variables and secrets
33
weight: 9
44
menu:
55
resources:
@@ -9,29 +9,23 @@ cli: true
99
---
1010

1111
Multiple API checks can target the same server/service. In this case, your checks might need the same configuration item
12-
like an authentication token, a specific user name or even just some specific part of the URL. You can use global variables to
12+
like an authentication token, a specific user name or even just some specific part of the URL. You can use variables to
1313
'DRY' up your checks and store these variables in just one place.
1414

15+
{{< markdownpartial "_shared/variables-and-secrets.md" >}}
16+
1517
## Managing variables
1618

1719
You can manage environment variables for API checks at two different levels:
1820

1921
* Group level
2022
* Global level
2123

22-
Group variables are added on the Variables tab in a group. The variables stored here are accessible only in the group context.
23-
24-
![set group environment variable](/docs/images/api-checks/add-group-variable.png)
25-
26-
Global variables are added on the Variables tab. The variables stored here are globally accessible throughout Checkly, hence the “Global environment variables” title.
27-
28-
![set global environment variable](/docs/images/api-checks/add-global-variable.png)
29-
30-
All variables are stored as string values. You can click the lock icon to encrypt the values and hide the value from all users that do not have write access. Any data you “lock” is encrypted at rest and in flight on our back end and is only decrypted when needed.
24+
{{< markdownpartial "_shared/group-global-variables.md" >}}
3125

3226
## Accessing variables in API checks
3327

34-
Environment variables are exposed to your API checks using the common Handlebars/Moustache templating delimiters, i.e. `{{USER_API_KEY}}`. Note that Handlebars (double brackets) variables will be URI encoded. To avoid encoding, you can access your environment variables with triple brackets, i.e. `{{{USER_API_KEY}}}`.
28+
Variables are exposed to your API checks using the common Handlebars/Moustache templating delimiters, i.e. `{{USER_API_KEY}}`. Note that Handlebars (double brackets) variables will be URI encoded. To avoid encoding, you can access your environment variables with triple brackets, i.e. `{{{USER_API_KEY}}}`.
3529
Variables can be used in the following API checks fields:
3630

3731
- URL
@@ -40,12 +34,6 @@ Variables can be used in the following API checks fields:
4034
- Query parameters values
4135
- Basic authentication username and password
4236

43-
When typing in most of the variable-enabled fields we show a small helper popup to help select the right variable.
44-
45-
![access variables](/docs/images/api-checks/access-variables.png)
46-
47-
Note, just the Body input field does not show this helper popup.
48-
4937
## Using Handlebars helpers & built in variables
5038

5139
Next to your own variables, we've added some built-in variables and extended the [Handlebars](https://handlebarsjs.com/) templating system:

site/content/docs/browser-checks/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ test('Login to Checkly', async ({ page }) => { // 2
114114

115115
**4. Fill out input fields and submit:** Using the `page.type()` method we enter our email address and
116116
password. You would normally use environment variables here to keep sensitive data
117-
out of your scripts. See [Login scenarios and secrets](/docs/browser-checks/login-and-secrets/) for more info.
117+
out of your scripts. See [Login scenarios and secrets](/docs/browser-checks/login-scenarios/) for more info.
118118

119119
**5. Click Login button:** We use Playwright's `getByRole()` locator to find the login button and also `.click()` on it right away.
120120

@@ -261,7 +261,7 @@ Chrome is being used.
261261

262262
## Next Steps
263263
- Learn more about [built-in functionalities of Playwright Test](/docs/browser-checks/playwright-test/).
264-
- Learn how to deal with [login scenarios and private data](/docs/browser-checks/login-and-secrets/).
264+
- Learn how to deal with [login scenarios and private data](/docs/browser-checks/login-scenarios/).
265265
- Use [Playwright Codegen](https://playwright.dev/docs/codegen) to record scripts without coding.
266266
- Learn more about [taking screenshots](/docs/browser-checks/screenshots/).
267267
- Learn more about [visual regression & snapshot testing](/docs/browser-checks/visual-regression-snapshot-testing/).

site/content/docs/browser-checks/variables.md

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Environment variables
2+
title: Variables and secrets
33
weight: 21
44
menu:
55
resources:
@@ -10,29 +10,23 @@ cli: true
1010

1111
When creating browser checks, you probably run some code locally, store it in a Git repo or copy and paste it around
1212
a bit. This means the credentials in the script are at risk of being exposed.
13-
You should therefore **replace any confidential data in your browser check scripts with environment variables.**
13+
You should therefore **replace any confidential data in your check scripts with variables or secrets.**
1414

15-
## Managing variables
16-
17-
For browser checks, you can create environment variables at three hierarchical levels:
15+
{{< markdownpartial "_shared/variables-and-secrets.md" >}}
1816

19-
- **Check** level
20-
- **Group** level
21-
- **Global** level
22-
23-
Check variables are added on the **Variables** tab for each browser check.
17+
## Managing variables
2418

25-
![add local variables](/docs/images/browser-checks/add-local-variable.png)
19+
You can create variables at three hierarchical levels:
2620

27-
Group variables are added on the **Variables** tab in a [group](/docs/groups/). The variables stored here are accessible
28-
only in the group context.
21+
- **Check** level - Browser and multistep check supported.
22+
- **Group** level - API, browser and multistep check supported.
23+
- **Global** level - API, browser and multistep check supported.
2924

30-
![add group variables](/docs/images/browser-checks/add-group-variable.png)
25+
Add variables specific to a Check variables on the **Variables** tab for each browser and multistep check.
3126

32-
Global variables are added on the **Variables** tab. The variables stored here are globally accessible
33-
throughout Checkly, hence the "Global environment variables" title.
27+
![add local variables](/docs/images/browser-checks/check-environment-variables.png)
3428

35-
![add global variables](/docs/images/browser-checks/add-global-variable.png)
29+
{{< markdownpartial "_shared/group-global-variables.md" >}}
3630

3731
{{<info >}}
3832
Whenever possible, store variables at the global level. This DRY's up your code.
@@ -46,7 +40,7 @@ If you want to avoid team members with Read Only access from viewing environment
4640

4741
## Accessing variables
4842

49-
Both check, group and global environment variables are accessible in your code using the standard Node.js `process.env.MY_VAR` notation.
43+
Check, group and global variables are accessible in your code using the standard Node.js `process.env.MY_VAR` notation.
5044
For example, the code snippet below show how you can log into GitHub. We have more [examples of login scenarios on this page.](/docs/browser-checks/login-scenarios/)
5145

5246
{{< tabs "Variables example" >}}

site/content/docs/cli/command-line-reference.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,11 @@ List all available runtimes and their dependencies.
163163

164164
## `npx checkly env`
165165

166-
Manage the global environment variables of a Checkly account. You can list, add, remove, update and export environment variables.
166+
Manage the global variables of a Checkly account. You can list, add, remove, update and export environment variables.
167167

168168
### `npx checkly env pull`
169169

170-
Export global environment variables from your Checkly account to a local `.env` file or a different file of your choice.
170+
Export global variables from your Checkly account to a local `.env` file or a different file of your choice. For secrets, only the key will be exported, not the value.
171171

172172
```bash
173173
checkly env pull [FILENAME] [-f]
@@ -179,51 +179,53 @@ checkly env pull [FILENAME] [-f]
179179
```bash
180180
npx checkly env pull -f
181181
```
182-
Pull all environment variables to the `.env` file and overwrite it if it already exists.
182+
Pull all global variables to the `.env` file and overwrite it if it already exists.
183183

184184
### `npx checkly env ls`
185185

186-
List global environment variables. This command does not list environment variables on group or check level.
186+
List global variables. This command does not list variables on group or check level. For secrets, only the key name will be shown, not its value.
187187

188188
```bash
189189
checkly env ls
190190
```
191191

192192
### `npx checkly env add`
193193

194-
Add a global environment variable.
194+
Add a global variable.
195195

196196
```bash
197-
checkly env add [KEY] [VALUE] [-l]
197+
checkly env add [KEY] [VALUE] [-l | -s]
198198
```
199199

200200
- `KEY`: Environment variable key.
201201
- `VALUE`: Environment variable value.
202202
- `--locked` or `-l`: Indicate that the environment variable will be locked, making it private to all read only users.
203+
- `--secret` or `-s`: Indicate that the environment variable will be created as a secret.
203204

204205

205206
### `npx checkly env update`
206207

207-
Update a global environment variable.
208+
Update a global variable.
208209

209210
```bash
210-
checkly env update [KEY] [VALUE] [-l]
211+
checkly env update [KEY] [VALUE] [-l | -s]
211212
```
212213

213-
- `KEY`: Environment variable key.
214-
- `VALUE`: Environment variable value.
215-
- `--locked` or `-l`: Indicate that the environment variable will be locked, making it private to all read only users.
214+
- `KEY`: Variable key.
215+
- `VALUE`: Variable value.
216+
- `--locked` or `-l`: Indicate that the variable will be locked, making it private to all read only users.
217+
- `--secret` or `-s`: Indicate that the variable will be changed to a secret. Note that secrets cannot be changed to variables. When updating a secret always pass the `-s` flag.
216218

217219
### `npx checkly env rm`
218220

219-
Remove a global environment variable.
221+
Remove a global variable.
220222

221223
```bash
222224
checkly env rm [KEY] [-f]
223225
```
224226

225-
- `KEY`: Environment variable key.
226-
- `--force` or `-f`: Skips the confirmation dialog when removing an environment.
227+
- `KEY`: Variable key.
228+
- `--force` or `-f`: Skips the confirmation dialog when removing a variable.
227229

228230

229231
## `npx checkly sync-playwright`

0 commit comments

Comments
 (0)