diff options
Diffstat (limited to 'resource_statuscaketest.go')
-rw-r--r-- | resource_statuscaketest.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/resource_statuscaketest.go b/resource_statuscaketest.go index 53b3059..08ace97 100644 --- a/resource_statuscaketest.go +++ b/resource_statuscaketest.go | |||
@@ -67,8 +67,11 @@ func CreateTest(d *schema.ResourceData, meta interface{}) error { | |||
67 | newTest := &statuscake.Test{ | 67 | newTest := &statuscake.Test{ |
68 | WebsiteName: d.Get("website_name").(string), | 68 | WebsiteName: d.Get("website_name").(string), |
69 | WebsiteURL: d.Get("website_url").(string), | 69 | WebsiteURL: d.Get("website_url").(string), |
70 | TestType: d.Get("test_type").(string), | ||
71 | CheckRate: d.Get("check_rate").(int), | 70 | CheckRate: d.Get("check_rate").(int), |
71 | TestType: d.Get("test_type").(string), | ||
72 | Paused: d.Get("paused").(bool), | ||
73 | Timeout: d.Get("timeout").(int), | ||
74 | ContactID: d.Get("contact_id").(int), | ||
72 | } | 75 | } |
73 | 76 | ||
74 | log.Printf("[DEBUG] Creating new StatusCake Test: %s", d.Get("website_name").(string)) | 77 | log.Printf("[DEBUG] Creating new StatusCake Test: %s", d.Get("website_name").(string)) |
@@ -124,7 +127,13 @@ func ReadTest(d *schema.ResourceData, meta interface{}) error { | |||
124 | if err != nil { | 127 | if err != nil { |
125 | return fmt.Errorf("Error Getting StatusCake Test Details for %s: Error: %s", d.Id(), err) | 128 | return fmt.Errorf("Error Getting StatusCake Test Details for %s: Error: %s", d.Id(), err) |
126 | } | 129 | } |
130 | d.Set("website_name", testResp.WebsiteName) | ||
131 | d.Set("website_url", testResp.WebsiteURL) | ||
127 | d.Set("check_rate", testResp.CheckRate) | 132 | d.Set("check_rate", testResp.CheckRate) |
133 | d.Set("test_type", testResp.TestType) | ||
134 | d.Set("paused", testResp.Paused) | ||
135 | d.Set("timeout", testResp.Timeout) | ||
136 | d.Set("contact_id", testResp.ContactID) | ||
128 | 137 | ||
129 | return nil | 138 | return nil |
130 | } | 139 | } |