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 {
198198}
199199
200200func ParameterValidationFromBlock (block * terraform.Block ) (types.ParameterValidation , hcl.Diagnostics ) {
201- diags := required (block , "error" )
201+ diags := required (block )
202202 if diags .HasErrors () {
203203 return types.ParameterValidation {}, diags
204204 }
205205
206- pErr , errDiag := requiredString (block , "error" )
207- if errDiag != nil {
208- diags = diags .Append (errDiag )
209- }
210-
211206 if diags .HasErrors () {
212207 return types.ParameterValidation {}, diags
213208 }
214209
215210 p := types.ParameterValidation {
216211 Regex : nullableString (block , "regex" ),
217- Error : pErr ,
212+ Error : optionalString ( block , "error" ) ,
218213 Min : nullableInteger (block , "min" ),
219214 Max : nullableInteger (block , "max" ),
220215 Monotonic : nullableString (block , "monotonic" ),
You can’t perform that action at this time.
0 commit comments