Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ability to add and update contact groups using the terraform statuscake provider #7115

Merged
merged 5 commits into from
Jan 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions builtin/providers/statuscake/resource_statuscaketest.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -53,10 +58,6 @@ func resourceStatusCakeTest() *schema.Resource {
Type: schema.TypeInt,
Computed: true,
},
"contact_id": &schema.Schema{
Type: schema.TypeInt,
Optional: true,
},
},
}
}
Expand Down Expand Up @@ -146,6 +147,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)
}
Expand Down
2 changes: 1 addition & 1 deletion vendor/github.com/DreamItGetIT/statuscake/tests.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ resource "statuscake_test" "google" {
website_url = "www.google.com"
test_type = "HTTP"
check_rate = 300
contact_id = 12345
}
```
2 changes: 2 additions & 0 deletions website/source/docs/providers/statuscake/r/test.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ resource "statuscake_test" "google" {
website_url = "www.google.com"
test_type = "HTTP"
check_rate = 300
contact_id = 12345
}
```

Expand All @@ -28,6 +29,7 @@ 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
* `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.
Expand Down