aboutsummaryrefslogtreecommitdiffhomepage
path: root/resource_statuscaketest.go
diff options
context:
space:
mode:
authorLee Johnson <leejohnson@ijoinsolutions.com>2016-06-10 12:38:56 -0400
committerLee Johnson <leejohnson@ijoinsolutions.com>2016-06-10 12:38:56 -0400
commite7b04dd5bb4a5947d1f4e9049ec90032b62faa5e (patch)
tree6b4ea152fc0b2add49691dbb17425d8755803fe9 /resource_statuscaketest.go
parent4917b1d3ebabeb85d8b8087a375fc90d41c7d6c1 (diff)
downloadterraform-provider-statuscake-e7b04dd5bb4a5947d1f4e9049ec90032b62faa5e.tar.gz
terraform-provider-statuscake-e7b04dd5bb4a5947d1f4e9049ec90032b62faa5e.tar.zst
terraform-provider-statuscake-e7b04dd5bb4a5947d1f4e9049ec90032b62faa5e.zip
Adding ability to add and update contact groups using the terraform statuscake provider
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 }