terraform-provider-sumologic icon indicating copy to clipboard operation
terraform-provider-sumologic copied to clipboard

Monitors time_range accepted values should be documented

Open mccartney opened this issue 4 years ago • 1 comments

https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/monitor doesn't seem to mention that only selected values for time_range are allowed. If you try to use: -25h you might get:

10:49:44  Error: {"id":"XV623-9VCYR-Q3NNU","errors":[{"code":"monitors:unsupported_trigger_time_range","message":"Unsupported trigger time range.","detail":"Unsupported trigger timeRange. Allowed values are: 5 min, 10 min, 15 min, 30 min, 60 min, 360 min, 720 min, 1440 min"}]}

Also the error message is slightly misleading - as it suggests values in syntax which is not supported, e.g. I cannot specify time_range = "5 min", the expected syntax is time_range = "-5m":

Error: {"id":"ZJO48-3MAVU-Q5MTY","errors":[{"code":"monitors:unsupported_trigger_time_range","message":"Unsupported trigger time range.","detail":"'5 min' is not a valid time range format. Example, -5m."}]}

mccartney avatar May 18 '21 07:05 mccartney

argh, I didn't realize linking the issue with the PR will close this when the PR gets merged. Reopening it since the PR addresses only part of the issue.

kumar-avijit avatar Jul 06 '21 19:07 kumar-avijit