Optional: true,
Default: 5,
},
+
"custom_header": {
Type: schema.TypeString,
Optional: true,
},
"test_tags": {
- Type: schema.TypeString,
+ Type: schema.TypeSet,
+ Elem: &schema.Schema{Type: schema.TypeString},
Optional: true,
+ Set: schema.HashString,
},
"status_codes": {
FindString: d.Get("find_string").(string),
DoNotFind: d.Get("do_not_find").(bool),
RealBrowser: d.Get("real_browser").(int),
- TestTags: d.Get("test_tags").(string),
+ TestTags: castSetToSliceStrings(d.Get("test_tags").(*schema.Set).List()),
StatusCodes: d.Get("status_codes").(string),
UseJar: d.Get("use_jar").(int),
PostRaw: d.Get("post_raw").(string),
test.RealBrowser = v.(int)
}
if v, ok := d.GetOk("test_tags"); ok {
- test.TestTags = v.(string)
+ test.TestTags = castSetToSliceStrings(v.(*schema.Set).List())
}
if v, ok := d.GetOk("status_codes"); ok {
test.StatusCodes = v.(string)
resource.TestCheckResourceAttr("statuscake_test.google", "find_string", "string15212"),
resource.TestCheckResourceAttr("statuscake_test.google", "do_not_find", "false"),
resource.TestCheckResourceAttr("statuscake_test.google", "real_browser", "1"),
- resource.TestCheckResourceAttr("statuscake_test.google", "test_tags", "string8191"),
+ resource.TestCheckResourceAttr("statuscake_test.google", "test_tags.#", "1"),
resource.TestCheckResourceAttr("statuscake_test.google", "status_codes", "string23065"),
resource.TestCheckResourceAttr("statuscake_test.google", "use_jar", "1"),
resource.TestCheckResourceAttr("statuscake_test.google", "post_raw", "string32096"),
find_string = "string15212"
do_not_find = false
real_browser = 1
- test_tags = "string8191"
+ test_tags = ["string8191"]
status_codes = "string23065"
use_jar = 1
post_raw = "string32096"
* `find_string` - (Optional) A string that should either be found or not found.
* `do_not_find` - (Optional) If the above string should be found to trigger a alert. 1 = will trigger if find_string found.
* `real_browser` - (Optional) Use 1 to TURN OFF real browser testing.
-* `test_tags` - (Optional) Tags should be seperated by a comma - no spacing between tags (this,is,a set,of,tags).
+* `test_tags` - (Optional) Set test tags, must be array of strings.
* `status_codes` - (Optional) Comma Seperated List of StatusCodes to Trigger Error on. Defaults are "204, 205, 206, 303, 400, 401, 403, 404, 405, 406, 408, 410, 413, 444, 429, 494, 495, 496, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 521, 522, 523, 524, 520, 598, 599".
* `use_jar` - (Optional) Set to true to enable the Cookie Jar. Required for some redirects. Default is false.
* `post_raw` - (Optional) Use to populate the RAW POST data field on the test.