Skip to content

Commit fbe2c05

Browse files
committed
Remove stubbed in validation fn
1 parent cf9f09e commit fbe2c05

File tree

1 file changed

+1
-41
lines changed

1 file changed

+1
-41
lines changed

mysql/resource_ti_resource_group.go

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,6 @@ func resourceTiResourceGroup() *schema.Resource {
7272
"resource_units": {
7373
Type: schema.TypeInt,
7474
Required: true,
75-
// TODO: validate
76-
//ValidateFunc: func(val any, key string) (warns []string, errs []error) {
77-
// value := val.(string)
78-
// match, _ := regexp.MatchString("(^`(.*)`$|')", value)
79-
// if match {
80-
// errs = append(errs, fmt.Errorf("%q is badly formatted. %q cant contain any ' string or `<value>`, got: %s", key, key, value))
81-
// }
82-
// return
83-
//},
8475
},
8576
"priority": {
8677
Type: schema.TypeString,
@@ -103,39 +94,8 @@ func resourceTiResourceGroup() *schema.Resource {
10394
Default: DefaultResourceGroup.QueryLimit,
10495
ForceNew: false,
10596
Optional: true,
106-
/*
107-
108-
ValidateFunc: func(i interface{}, s string) ([]string, []error) {
109-
arg := i.(string)
110-
pieces := strings.Split(arg, ",")
111-
for _, p := range pieces {
112-
kv := strings.SplitN(strings.TrimSpace(p), "=", 2)
113-
k := kv[0]
114-
v := kv[1]
115-
switch(k) {
116-
case "EXEC_ELAPSED":
117-
// must be 60s format
118-
// regex for \d+s
119-
break
120-
case "ACTION":
121-
options := []string{"DRYRUN", "COOLDOWN", "KILL"}
122-
slice.Includes()
123-
124-
break
125-
case "WATCH":
126-
// WATCH=SIMILAR DURATION '60s' where SIMILAR | EXACT | PLAN
127-
break
128-
default:
129-
// throw error
130-
131-
132-
}
133-
}
134-
*/
135-
},
13697
},
137-
// TODO: include background
138-
},
98+
}
13999
}
140100
}
141101

0 commit comments

Comments
 (0)