Skip to content

Commit

Permalink
feat: support new check intervals (#181)
Browse files Browse the repository at this point in the history
* feat: add new check intervals

* test: add new interval test
  • Loading branch information
pilimartinez committed Aug 2, 2022
1 parent dc55746 commit ba8eed7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions checkly/resource_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func resourceCheck() *schema.Resource {
ValidateFunc: func(val interface{}, key string) (warns []string, errs []error) {
v := val.(int)
valid := false
validFreqs := []int{0, 1, 5, 10, 15, 30, 60, 720, 1440}
validFreqs := []int{0, 1, 2, 5, 10, 15, 30, 60, 120, 180, 360, 720, 1440}
for _, i := range validFreqs {
if v == i {
valid = true
Expand All @@ -55,7 +55,7 @@ func resourceCheck() *schema.Resource {
}
return warns, errs
},
Description: "The frequency in minutes to run the check. Possible values are `0`, `1`, `5`, `10`, `15`, `30`, `60`, `720`, and `1440`.",
Description: "The frequency in minutes to run the check. Possible values are `0`, `1`, `2`, `5`, `10`, `15`, `30`, `60`, `120`, `180`, `360`, `720`, and `1440`.",
},
"frequency_offset": {
Type: schema.TypeInt,
Expand Down
2 changes: 1 addition & 1 deletion checkly/resource_check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ const apiCheck_full = `
resource "checkly_check" "test" {
name = "apiCheck_full"
type = "API"
frequency = 10
frequency = 120
activated = true
muted = true
double_check = true
Expand Down
2 changes: 1 addition & 1 deletion demo/api-checks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ output "trigger_api_check-1-url" {
resource "checkly_check" "api-check-2" {
name = "API check 2"
type = "API"
frequency = 10
frequency = 120
activated = true
muted = true
double_check = true
Expand Down
2 changes: 1 addition & 1 deletion demo/browser-checks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resource "checkly_check" "browser-check-1" {
type = "BROWSER"
activated = true
should_fail = false
frequency = 10
frequency = 2
double_check = true
use_global_alert_settings = true
locations = [
Expand Down

0 comments on commit ba8eed7

Please sign in to comment.