Optional: true,
},
+ "enable_ssl_alert": {
+ Type: schema.TypeBool,
+ Optional: true,
+ Default: false,
+ },
+
"follow_redirect": {
Type: schema.TypeBool,
Optional: true,
UseJar: d.Get("use_jar").(int),
PostRaw: d.Get("post_raw").(string),
FinalEndpoint: d.Get("final_endpoint").(string),
+ EnableSSLAlert: d.Get("enable_ssl_alert").(bool),
FollowRedirect: d.Get("follow_redirect").(bool),
}
d.Set("use_jar", testResp.UseJar)
d.Set("post_raw", testResp.PostRaw)
d.Set("final_endpoint", testResp.FinalEndpoint)
+ d.Set("enable_ssl_alert", testResp.EnableSSLAlert)
d.Set("follow_redirect", testResp.FollowRedirect)
return nil
if v, ok := d.GetOk("final_endpoint"); ok {
test.FinalEndpoint = v.(string)
}
+ if v, ok := d.GetOk("enable_ssl_alert"); ok {
+ test.EnableSSLAlert = v.(bool)
+ }
if v, ok := d.GetOk("follow_redirect"); ok {
test.FollowRedirect = v.(bool)
}
resource.TestCheckResourceAttr("statuscake_test.google", "use_jar", "1"),
resource.TestCheckResourceAttr("statuscake_test.google", "post_raw", "string32096"),
resource.TestCheckResourceAttr("statuscake_test.google", "final_endpoint", "string10781"),
+ resource.TestCheckResourceAttr("statuscake_test.google", "enable_ssl_alert", "false"),
resource.TestCheckResourceAttr("statuscake_test.google", "follow_redirect", "true"),
),
},
err = check(key, value, test.PostRaw)
case "final_endpoint":
err = check(key, value, test.FinalEndpoint)
+ case "enable_ssl_alert":
+ err = check(key, value, strconv.FormatBool(test.EnableSSLAlert))
case "follow_redirect":
err = check(key, value, strconv.FormatBool(test.FollowRedirect))
}
use_jar = 1
post_raw = "string32096"
final_endpoint = "string10781"
+ enable_ssl_alert = false
follow_redirect = true
}
`
* `website_name` - (Required) This is the name of the test and the website to be monitored.
* `website_url` - (Required) The URL of the website to be monitored
* `check_rate` - (Optional) Test check rate in seconds. Defaults to 300
-* `contact_id` - **Deprecated** (Optional) The id of the contact group to be added to the test. Each test can have only one.
-* `contact_group` - (Optional) Set test contact groups, must be array of strings.
+* `contact_id` - **Deprecated** (Optional) The id of the contact group to be added to the test. Each test can have only one.
+* `contact_group` - (Optional) Set test contact groups, must be array of strings.
* `test_type` - (Required) The type of Test. Either HTTP, TCP, PING, or DNS
* `paused` - (Optional) Whether or not the test is paused. Defaults to false.
* `timeout` - (Optional) The timeout of the test in seconds.
* `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.
* `final_endpoint` - (Optional) Use to specify the expected Final URL in the testing process.
+* `enable_ssl_alert` - (Optional) HTTP Tests only. If enabled, tests will send warnings if the SSL certificate is about to expire. Paid users only. Default is false
* `follow_redirect` - (Optional) Use to specify whether redirects should be followed, set to true to enable. Default is false.
## Attributes Reference