File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -198,23 +198,18 @@ func ParameterUsageDiagnostics(p types.Parameter) hcl.Diagnostics {
198
198
}
199
199
200
200
func ParameterValidationFromBlock (block * terraform.Block ) (types.ParameterValidation , hcl.Diagnostics ) {
201
- diags := required (block , "error" )
201
+ diags := required (block )
202
202
if diags .HasErrors () {
203
203
return types.ParameterValidation {}, diags
204
204
}
205
205
206
- pErr , errDiag := requiredString (block , "error" )
207
- if errDiag != nil {
208
- diags = diags .Append (errDiag )
209
- }
210
-
211
206
if diags .HasErrors () {
212
207
return types.ParameterValidation {}, diags
213
208
}
214
209
215
210
p := types.ParameterValidation {
216
211
Regex : nullableString (block , "regex" ),
217
- Error : pErr ,
212
+ Error : optionalString ( block , "error" ) ,
218
213
Min : nullableInteger (block , "min" ),
219
214
Max : nullableInteger (block , "max" ),
220
215
Monotonic : nullableString (block , "monotonic" ),
You can’t perform that action at this time.
0 commit comments