Skip to content

Commit 75dcccb

Browse files
committed
SUMO-189150: removing validations from tf for SLI window aggregation
1 parent bf35009 commit 75dcccb

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

sumologic/resource_sumologic_slo.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff 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
1312
const fieldNameWindowBasedEvaluation = `window_based_evaluation`
1413
const fieldNameRequestBasedEvaluation = `request_based_evaluation`
1514
const sloContentTypeString = "Slo"
1615

1716
func 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,

0 commit comments

Comments
 (0)