aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAlexandre Garand <alexandre.garand@fretlink.com>2019-08-06 12:48:46 +0200
committerAlexandre Garand <alexandre.garand@fretlink.com>2019-08-06 15:00:41 +0200
commit4c25d89f7b248fb20b124fff6eb18b272b865463 (patch)
treea3db0cbe7e81190c8b5a0b8cfa7df79ab387fc22
parent5a4ed01b2130166bd200fe8342052d7957765ba3 (diff)
downloadterraform-provider-statuscake-4c25d89f7b248fb20b124fff6eb18b272b865463.tar.gz
terraform-provider-statuscake-4c25d89f7b248fb20b124fff6eb18b272b865463.tar.zst
terraform-provider-statuscake-4c25d89f7b248fb20b124fff6eb18b272b865463.zip
fix reading of test
-rw-r--r--statuscake/resource_statuscaketest.go16
1 files changed, 11 insertions, 5 deletions
diff --git a/statuscake/resource_statuscaketest.go b/statuscake/resource_statuscaketest.go
index 5af5b8f..88c7363 100644
--- a/statuscake/resource_statuscaketest.go
+++ b/statuscake/resource_statuscaketest.go
@@ -332,11 +332,8 @@ func ReadTest(d *schema.ResourceData, meta interface{}) error {
332 return fmt.Errorf("Error Getting StatusCake Test Details for %s: Error: %s", d.Id(), err) 332 return fmt.Errorf("Error Getting StatusCake Test Details for %s: Error: %s", d.Id(), err)
333 } 333 }
334 334
335 if v, ok := d.GetOk("contact_group"); ok { 335 d.Set("contact_id", testResp.ContactID)
336 d.Set("contact_group", v) 336 d.Set("contact_group", testResp.ContactGroup)
337 } else if v, ok := d.GetOk("contact_id"); ok {
338 d.Set("contact_id", v)
339 }
340 d.Set("website_name", testResp.WebsiteName) 337 d.Set("website_name", testResp.WebsiteName)
341 d.Set("website_url", testResp.WebsiteURL) 338 d.Set("website_url", testResp.WebsiteURL)
342 d.Set("check_rate", testResp.CheckRate) 339 d.Set("check_rate", testResp.CheckRate)
@@ -362,10 +359,19 @@ func ReadTest(d *schema.ResourceData, meta interface{}) error {
362 d.Set("do_not_find", testResp.DoNotFind) 359 d.Set("do_not_find", testResp.DoNotFind)
363 d.Set("status_codes", testResp.StatusCodes) 360 d.Set("status_codes", testResp.StatusCodes)
364 d.Set("use_jar", testResp.UseJar) 361 d.Set("use_jar", testResp.UseJar)
362 d.Set("user_agent", testResp.UserAgent)
365 d.Set("post_raw", testResp.PostRaw) 363 d.Set("post_raw", testResp.PostRaw)
366 d.Set("final_endpoint", testResp.FinalEndpoint) 364 d.Set("final_endpoint", testResp.FinalEndpoint)
367 d.Set("enable_ssl_alert", testResp.EnableSSLAlert) 365 d.Set("enable_ssl_alert", testResp.EnableSSLAlert)
368 d.Set("follow_redirect", testResp.FollowRedirect) 366 d.Set("follow_redirect", testResp.FollowRedirect)
367 d.Set("ping_url", testResp.PingURL)
368 d.Set("basic_user", testResp.BasicUser)
369 d.Set("basic_pass", testResp.BasicPass)
370 d.Set("public", testResp.Public)
371 d.Set("branding", testResp.Branding)
372 d.Set("virus", testResp.Virus)
373 d.Set("real_browser", testResp.RealBrowser)
374 d.Set("RealBrowser", testResp.TestTags)
369 375
370 return nil 376 return nil
371} 377}