aboutsummaryrefslogtreecommitdiffhomepage
path: root/resource_statuscaketest.go
diff options
context:
space:
mode:
Diffstat (limited to 'resource_statuscaketest.go')
-rw-r--r--resource_statuscaketest.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/resource_statuscaketest.go b/resource_statuscaketest.go
index 7f5ff67..d403848 100644
--- a/resource_statuscaketest.go
+++ b/resource_statuscaketest.go
@@ -33,6 +33,11 @@ func resourceStatusCakeTest() *schema.Resource {
33 Required: true, 33 Required: true,
34 }, 34 },
35 35
36 "contact_id": &schema.Schema{
37 Type: schema.TypeInt,
38 Optional: true,
39 },
40
36 "check_rate": &schema.Schema{ 41 "check_rate": &schema.Schema{
37 Type: schema.TypeInt, 42 Type: schema.TypeInt,
38 Optional: true, 43 Optional: true,
@@ -65,6 +70,7 @@ func CreateTest(d *schema.ResourceData, meta interface{}) error {
65 WebsiteURL: d.Get("website_url").(string), 70 WebsiteURL: d.Get("website_url").(string),
66 TestType: d.Get("test_type").(string), 71 TestType: d.Get("test_type").(string),
67 CheckRate: d.Get("check_rate").(int), 72 CheckRate: d.Get("check_rate").(int),
73 ContactID: d.Get("contact_id").(int),
68 } 74 }
69 75
70 log.Printf("[DEBUG] Creating new StatusCake Test: %s", d.Get("website_name").(string)) 76 log.Printf("[DEBUG] Creating new StatusCake Test: %s", d.Get("website_name").(string))
@@ -142,6 +148,9 @@ func getStatusCakeTestInput(d *schema.ResourceData) *statuscake.Test {
142 if v, ok := d.GetOk("check_rate"); ok { 148 if v, ok := d.GetOk("check_rate"); ok {
143 test.CheckRate = v.(int) 149 test.CheckRate = v.(int)
144 } 150 }
151 if v, ok := d.GetOk("contact_id"); ok {
152 test.ContactID = v.(int)
153 }
145 if v, ok := d.GetOk("test_type"); ok { 154 if v, ok := d.GetOk("test_type"); ok {
146 test.TestType = v.(string) 155 test.TestType = v.(string)
147 } 156 }