Skip to content

Commit 98bcc82

Browse files
committed
feat: update doc generation script and update docs
1 parent d9c8532 commit 98bcc82

16 files changed

+392
-119
lines changed

GNUmakefile

+2-4
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ fmt:
3636
go fmt ./checkly
3737
terraform fmt
3838

39-
doc:
40-
./tools/tfplugindocs
41-
39+
# Generate docs
4240
generate:
43-
go generate ./...
41+
cd tools; go generate ./...

docs/index.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,10 @@ resource "checkly_check" "example_check" {
7676
<!-- schema generated by tfplugindocs -->
7777
## Schema
7878

79-
### Required
80-
81-
- `api_key` (String)
82-
8379
### Optional
8480

8581
- `account_id` (String)
82+
- `api_key` (String, Sensitive)
8683
- `api_url` (String)
8784

8885
> For additional documentation and examples, check the Resources sections.

docs/resources/alert_channel.md

+17-16
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
page_title: "checkly_alert_channel Resource - terraform-provider-checkly"
44
subcategory: ""
55
description: |-
6-
Allows you to define alerting channels for the checks and groups in your account
6+
Allows you to define alerting channels for the checks and groups in your account.
77
---
88

99
# checkly_alert_channel (Resource)
1010

11-
Allows you to define alerting channels for the checks and groups in your account
11+
Allows you to define alerting channels for the checks and groups in your account.
1212

1313
## Example Usage
1414

@@ -115,24 +115,25 @@ resource "checkly_check" "example_check" {
115115

116116
### Optional
117117

118-
- `call` (Block Set, Max: 1) (see [below for nested schema](#nestedblock--call))
119-
- `email` (Block Set, Max: 1) (see [below for nested schema](#nestedblock--email))
120-
- `opsgenie` (Block Set, Max: 1) (see [below for nested schema](#nestedblock--opsgenie))
121-
- `pagerduty` (Block Set, Max: 1) (see [below for nested schema](#nestedblock--pagerduty))
118+
- `call` (Attributes) (see [below for nested schema](#nestedatt--call))
119+
- `email` (Attributes) (see [below for nested schema](#nestedatt--email))
120+
- `opsgenie` (Attributes) (see [below for nested schema](#nestedatt--opsgenie))
121+
- `pagerduty` (Attributes) (see [below for nested schema](#nestedatt--pagerduty))
122122
- `send_degraded` (Boolean) (Default `false`)
123123
- `send_failure` (Boolean) (Default `true`)
124124
- `send_recovery` (Boolean) (Default `true`)
125-
- `slack` (Block Set, Max: 1) (see [below for nested schema](#nestedblock--slack))
126-
- `sms` (Block Set, Max: 1) (see [below for nested schema](#nestedblock--sms))
125+
- `slack` (Attributes) (see [below for nested schema](#nestedatt--slack))
126+
- `sms` (Attributes) (see [below for nested schema](#nestedatt--sms))
127127
- `ssl_expiry` (Boolean) (Default `false`)
128128
- `ssl_expiry_threshold` (Number) Value must be between 1 and 30 (Default `30`)
129-
- `webhook` (Block Set, Max: 1) (see [below for nested schema](#nestedblock--webhook))
129+
- `webhook` (Attributes) (see [below for nested schema](#nestedatt--webhook))
130130

131131
### Read-Only
132132

133133
- `id` (String) The ID of this resource.
134+
- `last_updated` (String) When the resource was last updated by the provider.
134135

135-
<a id="nestedblock--call"></a>
136+
<a id="nestedatt--call"></a>
136137
### Nested Schema for `call`
137138

138139
Required:
@@ -141,15 +142,15 @@ Required:
141142
- `number` (String) The mobile number to receive the alerts
142143

143144

144-
<a id="nestedblock--email"></a>
145+
<a id="nestedatt--email"></a>
145146
### Nested Schema for `email`
146147

147148
Required:
148149

149150
- `address` (String) The email address of this email alert channel.
150151

151152

152-
<a id="nestedblock--opsgenie"></a>
153+
<a id="nestedatt--opsgenie"></a>
153154
### Nested Schema for `opsgenie`
154155

155156
Required:
@@ -160,7 +161,7 @@ Required:
160161
- `region` (String)
161162

162163

163-
<a id="nestedblock--pagerduty"></a>
164+
<a id="nestedatt--pagerduty"></a>
164165
### Nested Schema for `pagerduty`
165166

166167
Required:
@@ -173,7 +174,7 @@ Optional:
173174
- `service_name` (String)
174175

175176

176-
<a id="nestedblock--slack"></a>
177+
<a id="nestedatt--slack"></a>
177178
### Nested Schema for `slack`
178179

179180
Required:
@@ -182,7 +183,7 @@ Required:
182183
- `url` (String) The Slack webhook URL
183184

184185

185-
<a id="nestedblock--sms"></a>
186+
<a id="nestedatt--sms"></a>
186187
### Nested Schema for `sms`
187188

188189
Required:
@@ -191,7 +192,7 @@ Required:
191192
- `number` (String) The mobile number to receive the alerts
192193

193194

194-
<a id="nestedblock--webhook"></a>
195+
<a id="nestedatt--webhook"></a>
195196
### Nested Schema for `webhook`
196197

197198
Required:

docs/resources/check.md

+37-36
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
page_title: "checkly_check Resource - terraform-provider-checkly"
44
subcategory: ""
55
description: |-
6-
Checks allows you to monitor key webapp flows, backend API's and set up alerting, so you get a notification when things break or slow down.
6+
Check groups allow you to group together a set of related checks, which can also share default settings for various attributes.
77
---
88

99
# checkly_check (Resource)
1010

11-
Checks allows you to monitor key webapp flows, backend API's and set up alerting, so you get a notification when things break or slow down.
11+
Check groups allow you to group together a set of related checks, which can also share default settings for various attributes.
1212

1313
## Example Usage
1414

@@ -196,39 +196,40 @@ resource "checkly_check" "example_check" {
196196

197197
### Optional
198198

199-
- `alert_channel_subscription` (Block List) An array of channel IDs and whether they're activated or not. If you don't set at least one alert subscription for your check, we won't be able to alert you in case something goes wrong with it. (see [below for nested schema](#nestedblock--alert_channel_subscription))
200-
- `alert_settings` (Block List, Max: 1) (see [below for nested schema](#nestedblock--alert_settings))
199+
- `alert_channel_subscription` (Attributes List) An array of channel IDs and whether they're activated or not. If you don't set at least one alert subscription for your check, we won't be able to alert you in case something goes wrong with it. (see [below for nested schema](#nestedatt--alert_channel_subscription))
200+
- `alert_settings` (Attributes) (see [below for nested schema](#nestedatt--alert_settings))
201201
- `degraded_response_time` (Number) The response time in milliseconds starting from which a check should be considered degraded. Possible values are between 0 and 30000. (Default `15000`).
202202
- `double_check` (Boolean, Deprecated) Setting this to `true` will trigger a retry when a check fails from the failing region and another, randomly selected region before marking the check as failed.
203-
- `environment_variable` (Block List) Key/value pairs for setting environment variables during check execution, add locked = true to keep value hidden, add secret = true to create a secret variable. These are only relevant for browser checks. Use global environment variables whenever possible. (see [below for nested schema](#nestedblock--environment_variable))
203+
- `environment_variable` (Attributes List) Introduce additional environment variables to the check execution environment. Only relevant for browser checks. Prefer global environment variables when possible. (see [below for nested schema](#nestedatt--environment_variable))
204204
- `environment_variables` (Map of String, Deprecated) Key/value pairs for setting environment variables during check execution. These are only relevant for browser checks. Use global environment variables whenever possible.
205-
- `frequency_offset` (Number) This property only valid for API high frequency checks. To create a hight frequency check, the property `frequency` must be `0` and `frequency_offset` could be `10`, `20` or `30`.
205+
- `frequency_offset` (Number) This property is only valid for high frequency API checks. To create a high frequency check, the property `frequency` must be `0` and `frequency_offset` could be `10`, `20` or `30`.
206206
- `group_id` (Number) The id of the check group this check is part of.
207207
- `group_order` (Number) The position of this check in a check group. It determines in what order checks are run when a group is triggered from the API or from CI/CD.
208208
- `local_setup_script` (String) A valid piece of Node.js code to run in the setup phase.
209209
- `local_teardown_script` (String) A valid piece of Node.js code to run in the teardown phase.
210-
- `locations` (Set of String) An array of one or more data center locations where to run the this check. (Default ["us-east-1"])
210+
- `locations` (Set of String) An array of one or more data center locations where to run the checks.
211211
- `max_response_time` (Number) The response time in milliseconds starting from which a check should be considered failing. Possible values are between 0 and 30000. (Default `30000`).
212212
- `muted` (Boolean) Determines if any notifications will be sent out when a check fails/degrades/recovers.
213213
- `private_locations` (Set of String) An array of one or more private locations slugs.
214-
- `request` (Block Set, Max: 1) An API check might have one request config. (see [below for nested schema](#nestedblock--request))
215-
- `retry_strategy` (Block Set, Max: 1) A strategy for retrying failed check runs. (see [below for nested schema](#nestedblock--retry_strategy))
214+
- `request` (Attributes) (see [below for nested schema](#nestedatt--request))
215+
- `retry_strategy` (Attributes) A strategy for retrying failed check runs. (see [below for nested schema](#nestedatt--retry_strategy))
216216
- `run_parallel` (Boolean) Determines if the check should run in all selected locations in parallel or round-robin.
217217
- `runtime_id` (String) The id of the runtime to use for this check.
218218
- `script` (String) A valid piece of Node.js JavaScript code describing a browser interaction with the Puppeteer/Playwright framework or a reference to an external JavaScript file.
219219
- `setup_snippet_id` (Number) An ID reference to a snippet to use in the setup phase of an API check.
220220
- `should_fail` (Boolean) Allows to invert the behaviour of when a check is considered to fail. Allows for validating error status like 404.
221221
- `ssl_check` (Boolean, Deprecated) Determines if the SSL certificate should be validated for expiry.
222222
- `ssl_check_domain` (String) A valid fully qualified domain name (FQDN) to check its SSL certificate.
223-
- `tags` (Set of String) A list of tags for organizing and filtering checks.
223+
- `tags` (Set of String) Tags for organizing and filtering checks.
224224
- `teardown_snippet_id` (Number) An ID reference to a snippet to use in the teardown phase of an API check.
225225
- `use_global_alert_settings` (Boolean) When true, the account level alert settings will be used, not the alert setting defined on this check.
226226

227227
### Read-Only
228228

229229
- `id` (String) The ID of this resource.
230+
- `last_updated` (String) When the resource was last updated by the provider.
230231

231-
<a id="nestedblock--alert_channel_subscription"></a>
232+
<a id="nestedatt--alert_channel_subscription"></a>
232233
### Nested Schema for `alert_channel_subscription`
233234

234235
Required:
@@ -237,28 +238,28 @@ Required:
237238
- `channel_id` (Number)
238239

239240

240-
<a id="nestedblock--alert_settings"></a>
241+
<a id="nestedatt--alert_settings"></a>
241242
### Nested Schema for `alert_settings`
242243

243244
Optional:
244245

245246
- `escalation_type` (String) Determines what type of escalation to use. Possible values are `RUN_BASED` or `TIME_BASED`.
246-
- `parallel_run_failure_threshold` (Block List) (see [below for nested schema](#nestedblock--alert_settings--parallel_run_failure_threshold))
247-
- `reminders` (Block List) (see [below for nested schema](#nestedblock--alert_settings--reminders))
248-
- `run_based_escalation` (Block List) (see [below for nested schema](#nestedblock--alert_settings--run_based_escalation))
249-
- `ssl_certificates` (Block Set, Deprecated) (see [below for nested schema](#nestedblock--alert_settings--ssl_certificates))
250-
- `time_based_escalation` (Block List) (see [below for nested schema](#nestedblock--alert_settings--time_based_escalation))
247+
- `parallel_run_failure_threshold` (Attributes) (see [below for nested schema](#nestedatt--alert_settings--parallel_run_failure_threshold))
248+
- `reminders` (Attributes) (see [below for nested schema](#nestedatt--alert_settings--reminders))
249+
- `run_based_escalation` (Attributes) (see [below for nested schema](#nestedatt--alert_settings--run_based_escalation))
250+
- `ssl_certificates` (Attributes, Deprecated) At what interval the reminders should be sent. (see [below for nested schema](#nestedatt--alert_settings--ssl_certificates))
251+
- `time_based_escalation` (Attributes) (see [below for nested schema](#nestedatt--alert_settings--time_based_escalation))
251252

252-
<a id="nestedblock--alert_settings--parallel_run_failure_threshold"></a>
253+
<a id="nestedatt--alert_settings--parallel_run_failure_threshold"></a>
253254
### Nested Schema for `alert_settings.parallel_run_failure_threshold`
254255

255256
Optional:
256257

257258
- `enabled` (Boolean) Applicable only for checks scheduled in parallel in multiple locations.
258-
- `percentage` (Number) Possible values are `10`, `20`, `30`, `40`, `50`, `60`, `70`, `80`, `100`, and `100`. (Default `10`).
259+
- `percentage` (Number) Possible values are `10`, `20`, `30`, `40`, `50`, `60`, `70`, `80`, `90`, and `100`. (Default `10`).
259260

260261

261-
<a id="nestedblock--alert_settings--reminders"></a>
262+
<a id="nestedatt--alert_settings--reminders"></a>
262263
### Nested Schema for `alert_settings.reminders`
263264

264265
Optional:
@@ -267,15 +268,15 @@ Optional:
267268
- `interval` (Number) Possible values are `5`, `10`, `15`, and `30`. (Default `5`).
268269

269270

270-
<a id="nestedblock--alert_settings--run_based_escalation"></a>
271+
<a id="nestedatt--alert_settings--run_based_escalation"></a>
271272
### Nested Schema for `alert_settings.run_based_escalation`
272273

273274
Optional:
274275

275276
- `failed_run_threshold` (Number) After how many failed consecutive check runs an alert notification should be sent. Possible values are between 1 and 5. (Default `1`).
276277

277278

278-
<a id="nestedblock--alert_settings--ssl_certificates"></a>
279+
<a id="nestedatt--alert_settings--ssl_certificates"></a>
279280
### Nested Schema for `alert_settings.ssl_certificates`
280281

281282
Optional:
@@ -284,7 +285,7 @@ Optional:
284285
- `enabled` (Boolean) Determines if alert notifications should be sent for expiring SSL certificates. Possible values `true`, and `false`. (Default `false`).
285286

286287

287-
<a id="nestedblock--alert_settings--time_based_escalation"></a>
288+
<a id="nestedatt--alert_settings--time_based_escalation"></a>
288289
### Nested Schema for `alert_settings.time_based_escalation`
289290

290291
Optional:
@@ -293,21 +294,21 @@ Optional:
293294

294295

295296

296-
<a id="nestedblock--environment_variable"></a>
297+
<a id="nestedatt--environment_variable"></a>
297298
### Nested Schema for `environment_variable`
298299

299300
Required:
300301

301-
- `key` (String)
302-
- `value` (String)
302+
- `key` (String) The name of the environment variable.
303+
- `value` (String, Sensitive) The value of the environment variable. By default the value is plain text and can be seen by any team member. It will also be present in check results and logs.
303304

304305
Optional:
305306

306-
- `locked` (Boolean)
307-
- `secret` (Boolean)
307+
- `locked` (Boolean) Locked environment variables are encrypted at rest and in flight on the Checkly backend and are only decrypted when needed. Their value is hidden by default, but can be accessed by team members with the appropriate permissions.
308+
- `secret` (Boolean) Secret environment variables are always encrypted and their value is never shown to any user. However, keep in mind that your Terraform state will still contain the value.
308309

309310

310-
<a id="nestedblock--request"></a>
311+
<a id="nestedatt--request"></a>
311312
### Nested Schema for `request`
312313

313314
Required:
@@ -316,8 +317,8 @@ Required:
316317

317318
Optional:
318319

319-
- `assertion` (Block Set) A request can have multiple assertions. (see [below for nested schema](#nestedblock--request--assertion))
320-
- `basic_auth` (Block Set, Max: 1) Set up HTTP basic authentication (username & password). (see [below for nested schema](#nestedblock--request--basic_auth))
320+
- `assertion` (Attributes List) (see [below for nested schema](#nestedatt--request--assertion))
321+
- `basic_auth` (Attributes) Credentials for Basic HTTP authentication. (see [below for nested schema](#nestedatt--request--basic_auth))
321322
- `body` (String) The body of the request.
322323
- `body_type` (String) The `Content-Type` header of the request. Possible values `NONE`, `JSON`, `FORM`, `RAW`, and `GRAPHQL`.
323324
- `follow_redirects` (Boolean)
@@ -327,31 +328,31 @@ Optional:
327328
- `query_parameters` (Map of String)
328329
- `skip_ssl` (Boolean)
329330

330-
<a id="nestedblock--request--assertion"></a>
331+
<a id="nestedatt--request--assertion"></a>
331332
### Nested Schema for `request.assertion`
332333

333334
Required:
334335

335336
- `comparison` (String) The type of comparison to be executed between expected and actual value of the assertion. Possible values `EQUALS`, `NOT_EQUALS`, `HAS_KEY`, `NOT_HAS_KEY`, `HAS_VALUE`, `NOT_HAS_VALUE`, `IS_EMPTY`, `NOT_EMPTY`, `GREATER_THAN`, `LESS_THAN`, `CONTAINS`, `NOT_CONTAINS`, `IS_NULL`, and `NOT_NULL`.
336337
- `source` (String) The source of the asserted value. Possible values `STATUS_CODE`, `JSON_BODY`, `HEADERS`, `TEXT_BODY`, and `RESPONSE_TIME`.
338+
- `target` (String)
337339

338340
Optional:
339341

340342
- `property` (String)
341-
- `target` (String)
342343

343344

344-
<a id="nestedblock--request--basic_auth"></a>
345+
<a id="nestedatt--request--basic_auth"></a>
345346
### Nested Schema for `request.basic_auth`
346347

347348
Required:
348349

349-
- `password` (String)
350+
- `password` (String, Sensitive)
350351
- `username` (String)
351352

352353

353354

354-
<a id="nestedblock--retry_strategy"></a>
355+
<a id="nestedatt--retry_strategy"></a>
355356
### Nested Schema for `retry_strategy`
356357

357358
Required:

0 commit comments

Comments
 (0)