mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-30 10:47:14 -06:00
Merge branch 'statuscake_adding_contact_group' of https://github.com/ldjohnson/terraform into ldjohnson-statuscake_adding_contact_group
This commit is contained in:
commit
f6ac901315
@ -33,6 +33,11 @@ func resourceStatusCakeTest() *schema.Resource {
|
||||
Required: true,
|
||||
},
|
||||
|
||||
"contact_id": &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
Optional: true,
|
||||
},
|
||||
|
||||
"check_rate": &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
Optional: true,
|
||||
@ -53,10 +58,6 @@ func resourceStatusCakeTest() *schema.Resource {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
"contact_id": &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
Optional: true,
|
||||
},
|
||||
"confirmations": &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
Optional: true,
|
||||
@ -161,6 +162,9 @@ func getStatusCakeTestInput(d *schema.ResourceData) *statuscake.Test {
|
||||
if v, ok := d.GetOk("check_rate"); ok {
|
||||
test.CheckRate = v.(int)
|
||||
}
|
||||
if v, ok := d.GetOk("contact_id"); ok {
|
||||
test.ContactID = v.(int)
|
||||
}
|
||||
if v, ok := d.GetOk("test_type"); ok {
|
||||
test.TestType = v.(string)
|
||||
}
|
||||
|
@ -34,5 +34,6 @@ resource "statuscake_test" "google" {
|
||||
website_url = "www.google.com"
|
||||
test_type = "HTTP"
|
||||
check_rate = 300
|
||||
contact_id = 12345
|
||||
}
|
||||
```
|
||||
|
@ -8,7 +8,7 @@ description: |-
|
||||
|
||||
# statuscake\_test
|
||||
|
||||
The test resource allows StatusCake tests to be managed by Terraform.
|
||||
The test resource allows StatusCake tests to be managed by Terraform.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@ -18,6 +18,7 @@ resource "statuscake_test" "google" {
|
||||
website_url = "www.google.com"
|
||||
test_type = "HTTP"
|
||||
check_rate = 300
|
||||
contact_id = 12345
|
||||
}
|
||||
```
|
||||
|
||||
@ -26,9 +27,10 @@ resource "statuscake_test" "google" {
|
||||
The following arguments are supported:
|
||||
|
||||
* `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.
|
||||
* `test_type` - (Required) The type of Test. Either HTTP or TCP.
|
||||
* `website_url` - (Required) The URL of the website to be monitored
|
||||
* `check_rate` - (Optional) Test check rate in seconds. Defaults to 300
|
||||
* `contact_id` - (Optional) The id of the contact group to be add to the test. Each test can have only one.
|
||||
* `test_type` - (Required) The type of Test. Either HTTP or TCP
|
||||
* `paused` - (Optional) Whether or not the test is paused. Defaults to false.
|
||||
* `timeout` - (Optional) The timeout of the test in seconds.
|
||||
* `contact_id` - (Optional) The ID of the contact group to associate with the test.
|
||||
@ -39,4 +41,4 @@ The following arguments are supported:
|
||||
|
||||
The following attribute is exported:
|
||||
|
||||
* `test_id` - A unique identifier for the test.
|
||||
* `test_id` - A unique identifier for the test.
|
||||
|
Loading…
Reference in New Issue
Block a user