aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAlexandre Garand <alexandre.garand@fretlink.com>2019-08-06 15:03:30 +0200
committerAlexandre Garand <alexandre.garand@fretlink.com>2019-08-06 15:03:30 +0200
commit1dfb50cf3dd93e4d2b2a095ab454106edd84b859 (patch)
tree893678ff44ecd8a6d96848745dff79367476518e
parent464a0a808240c83e365ddc7a4c52b82ecf9b76c4 (diff)
parent4c25d89f7b248fb20b124fff6eb18b272b865463 (diff)
downloadterraform-provider-statuscake-1dfb50cf3dd93e4d2b2a095ab454106edd84b859.tar.gz
terraform-provider-statuscake-1dfb50cf3dd93e4d2b2a095ab454106edd84b859.tar.zst
terraform-provider-statuscake-1dfb50cf3dd93e4d2b2a095ab454106edd84b859.zip
Merge branch 'fix_read_test' of github.com:alexandreFre/terraform-provider-statuscake
-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}