diff options
Diffstat (limited to 'statuscake/resource_statuscaketest.go')
-rw-r--r-- | statuscake/resource_statuscaketest.go | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/statuscake/resource_statuscaketest.go b/statuscake/resource_statuscaketest.go index 27cf9bf..50e16f9 100644 --- a/statuscake/resource_statuscaketest.go +++ b/statuscake/resource_statuscaketest.go | |||
@@ -88,12 +88,12 @@ func resourceStatusCakeTest() *schema.Resource { | |||
88 | 88 | ||
89 | "status": { | 89 | "status": { |
90 | Type: schema.TypeString, | 90 | Type: schema.TypeString, |
91 | Optional: true, | 91 | Computed: true, |
92 | }, | 92 | }, |
93 | 93 | ||
94 | "uptime": { | 94 | "uptime": { |
95 | Type: schema.TypeFloat, | 95 | Type: schema.TypeFloat, |
96 | Optional: true, | 96 | Computed: true, |
97 | }, | 97 | }, |
98 | 98 | ||
99 | "node_locations": { | 99 | "node_locations": { |
@@ -240,6 +240,8 @@ func CreateTest(d *schema.ResourceData, meta interface{}) error { | |||
240 | } | 240 | } |
241 | 241 | ||
242 | d.Set("test_id", fmt.Sprintf("%d", response.TestID)) | 242 | d.Set("test_id", fmt.Sprintf("%d", response.TestID)) |
243 | d.Set("status", response.Status) | ||
244 | d.Set("uptime", fmt.Sprintf("%.3f", response.Uptime)) | ||
243 | d.SetId(fmt.Sprintf("%d", response.TestID)) | 245 | d.SetId(fmt.Sprintf("%d", response.TestID)) |
244 | 246 | ||
245 | return ReadTest(d, meta) | 247 | return ReadTest(d, meta) |
@@ -365,12 +367,6 @@ func getStatusCakeTestInput(d *schema.ResourceData) *statuscake.Test { | |||
365 | if v, ok := d.GetOk("user_agent"); ok { | 367 | if v, ok := d.GetOk("user_agent"); ok { |
366 | test.UserAgent = v.(string) | 368 | test.UserAgent = v.(string) |
367 | } | 369 | } |
368 | if v, ok := d.GetOk("status"); ok { | ||
369 | test.Status = v.(string) | ||
370 | } | ||
371 | if v, ok := d.GetOk("uptime"); ok { | ||
372 | test.Uptime = v.(float64) | ||
373 | } | ||
374 | if v, ok := d.GetOk("node_locations"); ok { | 370 | if v, ok := d.GetOk("node_locations"); ok { |
375 | test.NodeLocations = v.([]string) | 371 | test.NodeLocations = v.([]string) |
376 | } | 372 | } |