diff --git a/provider/resource_config_auth.go b/provider/resource_config_auth.go index fd7fab2..9ccce5f 100644 --- a/provider/resource_config_auth.go +++ b/provider/resource_config_auth.go @@ -45,7 +45,7 @@ func resourceConfigAuth() *schema.Resource { }, Create: resourceConfigAuthCreate, Read: resourceConfigAuthRead, - Update: resourceConfigAuthUpdate, + Update: resourceConfigAuthCreate, Delete: resourceConfigAuthDelete, } } @@ -69,17 +69,17 @@ func resourceConfigAuthRead(d *schema.ResourceData, m interface{}) error { return nil } -func resourceConfigAuthUpdate(d *schema.ResourceData, m interface{}) error { - apiClient := m.(*client.Client) - body := client.GetConfigAuth(d) +// func resourceConfigAuthUpdate(d *schema.ResourceData, m interface{}) error { +// apiClient := m.(*client.Client) +// body := client.GetConfigAuth(d) - _, _, err := apiClient.SendRequest("PUT", models.PathConfig, body, 200) - if err != nil { - return err - } +// _, _, err := apiClient.SendRequest("PUT", models.PathConfig, body, 200) +// if err != nil { +// return err +// } - return resourceConfigAuthRead(d, m) -} +// return resourceConfigAuthRead(d, m) +// } func resourceConfigAuthDelete(d *schema.ResourceData, m interface{}) error { return nil diff --git a/provider/resource_config_email.go b/provider/resource_config_email.go index 8c2e3a4..f4218ab 100644 --- a/provider/resource_config_email.go +++ b/provider/resource_config_email.go @@ -42,7 +42,7 @@ func resourceConfigEmail() *schema.Resource { }, Create: resourceConfigEmailCreate, Read: resourceConfigEmailRead, - Update: resourceConfigEmailUpdate, + Update: resourceConfigEmailCreate, Delete: resourceConfigEmailDelete, } } @@ -65,18 +65,18 @@ func resourceConfigEmailRead(d *schema.ResourceData, m interface{}) error { return nil } -func resourceConfigEmailUpdate(d *schema.ResourceData, m interface{}) error { - apiClient := m.(*client.Client) +// func resourceConfigEmailUpdate(d *schema.ResourceData, m interface{}) error { +// apiClient := m.(*client.Client) - body := client.GetConfigEmail(d) +// body := client.GetConfigEmail(d) - _, _, err := apiClient.SendRequest("PUT", models.PathConfig, body, 200) - if err != nil { - return err - } +// _, _, err := apiClient.SendRequest("PUT", models.PathConfig, body, 200) +// if err != nil { +// return err +// } - return resourceConfigEmailRead(d, m) -} +// return resourceConfigEmailRead(d, m) +// } func resourceConfigEmailDelete(d *schema.ResourceData, m interface{}) error { return nil diff --git a/provider/resource_config_system.go b/provider/resource_config_system.go index f17136f..3596976 100644 --- a/provider/resource_config_system.go +++ b/provider/resource_config_system.go @@ -27,7 +27,7 @@ func resourceConfigSystem() *schema.Resource { }, Create: resourceConfigSystemCreate, Read: resourceConfigSystemRead, - Update: resourceConfigSystemUpdate, + Update: resourceConfigSystemCreate, Delete: resourceConfigSystemDelete, } } @@ -50,18 +50,18 @@ func resourceConfigSystemRead(d *schema.ResourceData, m interface{}) error { return nil } -func resourceConfigSystemUpdate(d *schema.ResourceData, m interface{}) error { - apiClient := m.(*client.Client) +// func resourceConfigSystemUpdate(d *schema.ResourceData, m interface{}) error { +// apiClient := m.(*client.Client) - body := client.GetConfigSystem(d) +// body := client.GetConfigSystem(d) - _, _, err := apiClient.SendRequest("PUT", models.PathConfig, body, 200) - if err != nil { - return err - } +// _, _, err := apiClient.SendRequest("PUT", models.PathConfig, body, 200) +// if err != nil { +// return err +// } - return resourceConfigSystemRead(d, m) -} +// return resourceConfigSystemRead(d, m) +// } func resourceConfigSystemDelete(d *schema.ResourceData, m interface{}) error { return nil diff --git a/provider/resource_interrogation_services.go b/provider/resource_interrogation_services.go index aa3700c..c11d53e 100644 --- a/provider/resource_interrogation_services.go +++ b/provider/resource_interrogation_services.go @@ -20,7 +20,7 @@ func resourceVuln() *schema.Resource { }, Create: resourceVulnCreate, Read: resourceVulnRead, - Update: resourceVulnUpdate, + Update: resourceVulnCreate, Delete: resourceVulnDelete, } } @@ -46,21 +46,21 @@ func resourceVulnRead(d *schema.ResourceData, m interface{}) error { return nil } -func resourceVulnUpdate(d *schema.ResourceData, m interface{}) error { - apiClient := m.(*client.Client) +// func resourceVulnUpdate(d *schema.ResourceData, m interface{}) error { +// apiClient := m.(*client.Client) - err := apiClient.SetScannerPolicy(d) - if err != nil { - return err - } +// err := apiClient.SetScannerPolicy(d) +// if err != nil { +// return err +// } - scanner := d.Get("default_scanner").(string) - if scanner != "" { - apiClient.SetDefaultScanner(scanner) - } +// scanner := d.Get("default_scanner").(string) +// if scanner != "" { +// apiClient.SetDefaultScanner(scanner) +// } - return resourceVulnRead(d, m) -} +// return resourceVulnRead(d, m) +// } func resourceVulnDelete(d *schema.ResourceData, m interface{}) error { apiClient := m.(*client.Client)