Skip to content

Commit d01b2b8

Browse files
Make diff suppression relative for SLO monitors
1 parent 2650635 commit d01b2b8

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

sumologic/resource_sumologic_monitors_library_monitor.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -502,15 +502,15 @@ var sloSLITriggerConditionSchema = map[string]*schema.Schema{
502502

503503
var sloBurnRateTriggerConditionSchema = map[string]*schema.Schema{
504504
"critical": nested(true, schemaMap{
505-
"time_range": &relativeTimeRangeSchema,
505+
"time_range": &timeRangeSchema,
506506
"burn_rate_threshold": {
507507
Type: schema.TypeFloat,
508508
Required: true,
509509
ValidateFunc: validation.FloatAtLeast(0),
510510
},
511511
}),
512512
"warning": nested(true, schemaMap{
513-
"time_range": &relativeTimeRangeSchema,
513+
"time_range": &timeRangeSchema,
514514
"burn_rate_threshold": {
515515
Type: schema.TypeFloat,
516516
Required: true,
@@ -555,13 +555,6 @@ var timeRangeSchema = schema.Schema{
555555
DiffSuppressFunc: SuppressEquivalentTimeDiff(false),
556556
}
557557

558-
var relativeTimeRangeSchema = schema.Schema{
559-
Type: schema.TypeString,
560-
Required: true,
561-
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^-?(\d)+[smhd]$`), "Time range must be in the format '-?\\d+[smhd]'. Examples: -15m, 1d, etc."),
562-
DiffSuppressFunc: SuppressEquivalentTimeDiff(true),
563-
}
564-
565558
var resolutionWindowSchema = schema.Schema{
566559
Type: schema.TypeString,
567560
Optional: true,

0 commit comments

Comments
 (0)