Type: schema.TypeInt,
Optional: true,
},
+
+ "trigger_rate": {
+ Type: schema.TypeInt,
+ Optional: true,
+ Default: 5,
+ },
},
}
}
ContactID: d.Get("contact_id").(int),
Confirmation: d.Get("confirmations").(int),
Port: d.Get("port").(int),
+ TriggerRate: d.Get("trigger_rate").(int),
}
log.Printf("[DEBUG] Creating new StatusCake Test: %s", d.Get("website_name").(string))
d.Set("contact_id", testResp.ContactID)
d.Set("confirmations", testResp.Confirmation)
d.Set("port", testResp.Port)
+ d.Set("trigger_rate", testResp.TriggerRate)
return nil
}
if v, ok := d.GetOk("port"); ok {
test.Port = v.(int)
}
+ if v, ok := d.GetOk("trigger_rate"); ok {
+ test.TriggerRate = v.(int)
+ }
defaultStatusCodes := "204, 205, 206, 303, 400, 401, 403, 404, 405, 406, " +
"408, 410, 413, 444, 429, 494, 495, 496, 499, 500, 501, 502, 503, " +
resource.TestCheckResourceAttr("statuscake_test.google", "timeout", "40"),
resource.TestCheckResourceAttr("statuscake_test.google", "contact_id", "0"),
resource.TestCheckResourceAttr("statuscake_test.google", "confirmations", "0"),
+ resource.TestCheckResourceAttr("statuscake_test.google", "trigger_rate", "20"),
),
},
},
err = check(key, value, strconv.Itoa(test.ContactID))
case "confirmations":
err = check(key, value, strconv.Itoa(test.Confirmation))
+ case "trigger_rate":
+ err = check(key, value, strconv.Itoa(test.TriggerRate))
}
if err != nil {
timeout = 10
contact_id = 43402
confirmations = 1
+ trigger_rate = 10
}
`
test_type = "HTTP"
check_rate = 500
paused = true
+ trigger_rate = 20
}
`