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: docs/guides/getting-started.md
+1-77
Original file line number
Diff line number
Diff line change
@@ -5,80 +5,4 @@ description: |-
5
5
Getting Started with Checkly Terraform Provider
6
6
---
7
7
8
-
# Installing the provider and getting started
9
-
10
-
1. Create a `versions.tf` terraform config file in your project:
11
-
12
-
```terraform
13
-
terraform {
14
-
required_providers {
15
-
checkly = {
16
-
source = "checkly/checkly"
17
-
version = "1.3.0"
18
-
}
19
-
}
20
-
}
21
-
22
-
variable "checkly_api_key" {
23
-
}
24
-
25
-
variable "checkly_account_id" {
26
-
}
27
-
28
-
provider "checkly" {
29
-
api_key = var.checkly_api_key
30
-
account_id = var.checkly_account_id
31
-
}
32
-
```
33
-
34
-
2. To use the provider with your Checkly account, you will need an API Key for your Checkly user. Go to the [User Settings: API Keys page](https://app.checklyhq.com/settings/user/api-keys) and click 'Create API Key'. Get your User API Key and add it to your env:
35
-
```bash
36
-
$ export TF_VAR_checkly_api_key=cu_xxx
37
-
```
38
-
39
-
3. You also need to set your target Account ID, which you can find under your [account settings](https://app.checklyhq.com/settings/account/general). If you don't have access to account settings, please contact your account owner/admin.
40
-
41
-
42
-
```bash
43
-
$ export TF_VAR_checkly_account_id=xxx
44
-
```
45
-
46
-
> ⚠️ If you are still using legacy Account API Keys, you can skip this step. Notice that Account API keys will be deprecated soon.
47
-
48
-
4. Run `$ terraform providers` in your terminal. The Checkly plugin should be listed.
5. Create a TF resource config file, for example `main.tf`:
57
-
```terraform
58
-
resource "checkly_check_group" "first-group" {
59
-
name = "Group 1"
60
-
activated = true
61
-
muted = false
62
-
concurrency = 3
63
-
locations = [ "eu-west-1" ]
64
-
}
65
-
66
-
resource "checkly_check" "first-api-check" {
67
-
name = "API check 1"
68
-
type = "API"
69
-
activated = true
70
-
muted = false
71
-
frequency = 720
72
-
73
-
request {
74
-
method = "GET"
75
-
url = "https://api.checklyhq.com/public-stats"
76
-
}
77
-
78
-
group_id = checkly_check_group.first-group.id
79
-
group_order = 1
80
-
81
-
}
82
-
```
83
-
84
-
6. Now run `$ terraform init` to setup a new project. Then use `$ terraform plan` followed by `$ terraform apply` to deploy your monitoring.
8
+
The Checkly Terraform provider enables you to declare your monitoring setup as code using HashiCorp Terraform. You can get started with it in a matter of minutes by following [our step-by-step tutorial](https://www.checklyhq.com/docs/terraform-provider/).
0 commit comments