@@ -308,7 +308,9 @@ func resourceSumologicMonitorsLibraryMonitorRead(d *schema.ResourceData, meta in
308308 if internalNotificationDict ["connectionType" ] != nil {
309309 internalNotification ["connection_type" ] = internalNotificationDict ["connectionType" ].(string )
310310 }
311- internalNotification ["action_type" ] = internalNotificationDict ["actionType" ].(string )
311+ if internalNotificationDict ["actionType" ] != nil {
312+ internalNotification ["action_type" ] = internalNotificationDict ["actionType" ].(string )
313+ }
312314 if internalNotification ["action_type" ].(string ) == "EmailAction" ||
313315 internalNotification ["action_type" ].(string ) == "Email" ||
314316 internalNotification ["connection_type" ].(string ) == "EmailAction" ||
@@ -398,15 +400,17 @@ func getNotifications(d *schema.ResourceData) []MonitorNotification {
398400 notificationActionDict ["connection_type" ].(string ) == "EmailAction" ||
399401 notificationActionDict ["connection_type" ].(string ) == "Email" {
400402 notificationAction := EmailNotification {}
401- notificationAction .ActionType = notificationActionDict ["action_type" ].(string )
403+ // notificationAction.ActionType = notificationActionDict["action_type"].(string)
404+ notificationAction .ConnectionType = notificationActionDict ["connection_type" ].(string )
402405 notificationAction .Subject = notificationActionDict ["subject" ].(string )
403406 notificationAction .Recipients = notificationActionDict ["recipients" ].([]interface {})
404407 notificationAction .MessageBody = notificationActionDict ["message_body" ].(string )
405408 notificationAction .TimeZone = notificationActionDict ["time_zone" ].(string )
406409 n .Notification = notificationAction
407410 } else {
408411 notificationAction := WebhookNotificiation {}
409- notificationAction .ActionType = notificationActionDict ["action_type" ].(string )
412+ // notificationAction.ActionType = notificationActionDict["action_type"].(string)
413+ notificationAction .ConnectionType = notificationActionDict ["connection_type" ].(string )
410414 notificationAction .ConnectionID = notificationActionDict ["connection_id" ].(string )
411415 notificationAction .PayloadOverride = notificationActionDict ["payload_override" ].(string )
412416 n .Notification = notificationAction
0 commit comments