@@ -74,17 +74,17 @@ func TestAccMonitorsLibraryMonitor_create(t *testing.T) {
7474 for i , v := range recipients {
7575 testRecipients [i ] = v
7676 }
77- triggerTypes := []string {"Critical" }
77+ triggerTypes := []string {"Critical" , "ResolvedCritical" }
7878 testTriggerTypes := make ([]interface {}, len (triggerTypes ))
7979 for i , v := range triggerTypes {
8080 testTriggerTypes [i ] = v
8181 }
8282 testNotificationAction := EmailNotification {
83- ActionType : "EmailAction " ,
84- Recipients : testRecipients ,
85- Subject : "test tf monitor" ,
86- TimeZone : "PST" ,
87- MessageBody : "test" ,
83+ ConnectionType : "Email " ,
84+ Recipients : testRecipients ,
85+ Subject : "test tf monitor" ,
86+ TimeZone : "PST" ,
87+ MessageBody : "test" ,
8888 }
8989 testNotifications := []MonitorNotification {
9090 {
@@ -111,7 +111,7 @@ func TestAccMonitorsLibraryMonitor_create(t *testing.T) {
111111 resource .TestCheckResourceAttr ("sumologic_monitor.test" , "content_type" , testContentType ),
112112 resource .TestCheckResourceAttr ("sumologic_monitor.test" , "queries.0.row_id" , testQueries [0 ].RowID ),
113113 resource .TestCheckResourceAttr ("sumologic_monitor.test" , "triggers.0.trigger_type" , testTriggers [0 ].TriggerType ),
114- resource .TestCheckResourceAttr ("sumologic_monitor.test" , "notifications.0.notification.0.action_type " , testNotifications [0 ].Notification .(EmailNotification ).ActionType ),
114+ resource .TestCheckResourceAttr ("sumologic_monitor.test" , "notifications.0.notification.0.connection_type " , testNotifications [0 ].Notification .(EmailNotification ).ConnectionType ),
115115 ),
116116 },
117117 },
@@ -165,11 +165,11 @@ func TestAccMonitorsLibraryMonitor_update(t *testing.T) {
165165 testTriggerTypes [i ] = v
166166 }
167167 testNotificationAction := EmailNotification {
168- ActionType : "EmailAction " ,
169- Recipients : testRecipients ,
170- Subject : "test tf monitor" ,
171- TimeZone : "PST" ,
172- MessageBody : "test" ,
168+ ConnectionType : "Email " ,
169+ Recipients : testRecipients ,
170+ Subject : "test tf monitor" ,
171+ TimeZone : "PST" ,
172+ MessageBody : "test" ,
173173 }
174174 testNotifications := []MonitorNotification {
175175 {
@@ -216,17 +216,17 @@ func TestAccMonitorsLibraryMonitor_update(t *testing.T) {
216216 for i , v := range updatedRecipients {
217217 testUpdatedRecipients [i ] = v
218218 }
219- updatedTriggerTypes := []string {"Critical" }
219+ updatedTriggerTypes := []string {"Critical" , "ResolvedCritical" }
220220 testUpdatedTriggerTypes := make ([]interface {}, len (updatedTriggerTypes ))
221221 for i , v := range updatedTriggerTypes {
222222 testUpdatedTriggerTypes [i ] = v
223223 }
224224 testUpdatedNotificationAction := EmailNotification {
225- ActionType : "EmailAction " ,
226- Recipients : testUpdatedRecipients ,
227- Subject : "test tf monitor" ,
228- TimeZone : "PST" ,
229- MessageBody : "test" ,
225+ ConnectionType : "Email " ,
226+ Recipients : testUpdatedRecipients ,
227+ Subject : "test tf monitor" ,
228+ TimeZone : "PST" ,
229+ MessageBody : "test" ,
230230 }
231231 testUpdatedNotifications := []MonitorNotification {
232232 {
@@ -253,7 +253,7 @@ func TestAccMonitorsLibraryMonitor_update(t *testing.T) {
253253 resource .TestCheckResourceAttr ("sumologic_monitor.test" , "content_type" , testContentType ),
254254 resource .TestCheckResourceAttr ("sumologic_monitor.test" , "queries.0.row_id" , testQueries [0 ].RowID ),
255255 resource .TestCheckResourceAttr ("sumologic_monitor.test" , "triggers.0.trigger_type" , testTriggers [0 ].TriggerType ),
256- resource .TestCheckResourceAttr ("sumologic_monitor.test" , "notifications.0.notification.0.action_type " , testNotifications [0 ].Notification .(EmailNotification ).ActionType ),
256+ resource .TestCheckResourceAttr ("sumologic_monitor.test" , "notifications.0.notification.0.connection_type " , testNotifications [0 ].Notification .(EmailNotification ).ConnectionType ),
257257 ),
258258 },
259259 {
@@ -267,7 +267,7 @@ func TestAccMonitorsLibraryMonitor_update(t *testing.T) {
267267 resource .TestCheckResourceAttr ("sumologic_monitor.test" , "content_type" , testUpdatedContentType ),
268268 resource .TestCheckResourceAttr ("sumologic_monitor.test" , "queries.0.row_id" , testUpdatedQueries [0 ].RowID ),
269269 resource .TestCheckResourceAttr ("sumologic_monitor.test" , "triggers.0.trigger_type" , testUpdatedTriggers [0 ].TriggerType ),
270- resource .TestCheckResourceAttr ("sumologic_monitor.test" , "notifications.0.notification.0.action_type " , testUpdatedNotifications [0 ].Notification .(EmailNotification ).ActionType ),
270+ resource .TestCheckResourceAttr ("sumologic_monitor.test" , "notifications.0.notification.0.connection_type " , testUpdatedNotifications [0 ].Notification .(EmailNotification ).ConnectionType ),
271271 ),
272272 },
273273 },
@@ -371,13 +371,13 @@ resource "sumologic_monitor" "test" {
371371 }
372372 notifications {
373373 notification {
374- action_type = "EmailAction "
374+ connection_type = "Email "
375375 recipients = ["[email protected] "] 376376 subject = "test tf monitor"
377377 time_zone = "PST"
378378 message_body = "test"
379379 }
380- run_for_trigger_types = ["Critical"]
380+ run_for_trigger_types = ["Critical", "ResolvedCritical" ]
381381 }
382382}` , testName )
383383}
@@ -415,13 +415,13 @@ resource "sumologic_monitor" "test" {
415415 }
416416 notifications {
417417 notification {
418- action_type = "EmailAction "
418+ connection_type = "Email "
419419 recipients = ["[email protected] "] 420420 subject = "test tf monitor"
421421 time_zone = "PST"
422422 message_body = "test"
423423 }
424- run_for_trigger_types = ["Critical"]
424+ run_for_trigger_types = ["Critical", "ResolvedCritical" ]
425425 }
426426}` , testName )
427427}
0 commit comments