File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -8,15 +8,13 @@ import (
88 "regexp"
99)
1010
11- const sloAggregationRegexString = `^(Avg|Min|Max|Sum|(p[5-9][0-9])(\.\d{1,3})?$)$` // TODO update it to allow lower pct values
12- const sloAggregationWindowRegexString = `^[0-9]{1,2}(m|h)$` // TODO make it exact of min 1m and max 1h
11+ const sloAggregationWindowRegexString = `^[0-9]{1,2}(m|h)$` // TODO make it exact of min 1m and max 1h
1312const fieldNameWindowBasedEvaluation = `window_based_evaluation`
1413const fieldNameRequestBasedEvaluation = `request_based_evaluation`
1514const sloContentTypeString = "Slo"
1615
1716func resourceSumologicSLO () * schema.Resource {
1817
19- aggrRegex := regexp .MustCompile (sloAggregationRegexString )
2018 windowRegex := regexp .MustCompile (sloAggregationWindowRegexString )
2119
2220 queryGroupElemSchema := & schema.Resource {
@@ -111,9 +109,8 @@ func resourceSumologicSLO() *schema.Resource {
111109 }, false ),
112110 },
113111 "aggregation" : {
114- Type : schema .TypeString ,
115- Optional : true ,
116- ValidateFunc : validation .StringMatch (aggrRegex , `value must match : ` + sloAggregationRegexString ),
112+ Type : schema .TypeString ,
113+ Optional : true ,
117114 },
118115 "size" : {
119116 Type : schema .TypeString ,
You can’t perform that action at this time.
0 commit comments