Skip to content

Commit bb3a1fa

Browse files
committed
Add acceptance test and docs
1 parent 382cfac commit bb3a1fa

File tree

3 files changed

+700
-2
lines changed

3 files changed

+700
-2
lines changed

sumologic/resource_sumologic_log_search.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,10 @@ func resourceSumologicLogSearchCreate(d *schema.ResourceData, meta interface{})
363363

364364
if d.Id() == "" {
365365
logSearch := resourceToLogSearch(d)
366-
log.Printf("creating log search : %+v", logSearch)
366+
log.Println("=====================================================================")
367+
log.Printf("creating log search - %+v", logSearch)
368+
log.Printf("log search schedule - %+v", logSearch.Schedule)
369+
log.Println("=====================================================================")
367370
id, err := c.CreateLogSearch(logSearch)
368371
if err != nil {
369372
return err
@@ -668,7 +671,7 @@ func resourceToScheduleSearchParameter(data interface{}) ScheduleSearchParameter
668671
func resourceToScheduleSearchNotification(data interface{}) interface{} {
669672

670673
notificationSlice := data.([]interface{})
671-
if len(notificationSlice) > 0 {
674+
if len(notificationSlice) > 0 && notificationSlice[0] != nil {
672675
notificationObj := notificationSlice[0].(map[string]interface{})
673676

674677
if val := notificationObj["alert_search_notification"].([]interface{}); len(val) == 1 {

0 commit comments

Comments
 (0)