Merge branch 'statuscake-contactgroup' of https://github.com/tape-tv/terraform into tape-tv-statuscake-contactgroup
This commit is contained in:
commit
517f0f8477
|
@ -53,6 +53,10 @@ func resourceStatusCakeTest() *schema.Resource {
|
|||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
"contact_id": &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
Optional: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -151,5 +155,8 @@ func getStatusCakeTestInput(d *schema.ResourceData) *statuscake.Test {
|
|||
if v, ok := d.GetOk("timeout"); ok {
|
||||
test.Timeout = v.(int)
|
||||
}
|
||||
if v, ok := d.GetOk("contact_id"); ok {
|
||||
test.ContactID = v.(int)
|
||||
}
|
||||
return test
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@ func TestAccStatusCake_withUpdate(t *testing.T) {
|
|||
testAccTestCheckExists("statuscake_test.google", &test),
|
||||
resource.TestCheckResourceAttr("statuscake_test.google", "check_rate", "500"),
|
||||
resource.TestCheckResourceAttr("statuscake_test.google", "paused", "true"),
|
||||
resource.TestCheckResourceAttr("statuscake_test.google", "contact_id", "23456"),
|
||||
),
|
||||
},
|
||||
},
|
||||
|
@ -101,6 +102,7 @@ resource "statuscake_test" "google" {
|
|||
website_url = "www.google.com"
|
||||
test_type = "HTTP"
|
||||
check_rate = 300
|
||||
contact_id = 12345
|
||||
}
|
||||
`
|
||||
|
||||
|
@ -111,5 +113,6 @@ resource "statuscake_test" "google" {
|
|||
test_type = "HTTP"
|
||||
check_rate = 500
|
||||
paused = true
|
||||
contact_id = 23456
|
||||
}
|
||||
`
|
||||
|
|
Loading…
Reference in New Issue