Skip to content

Commit

Permalink
Merge pull request #1 from csris/null-size-validator-fix
Browse files Browse the repository at this point in the history
Ignore Null and Unknown in storage size validator
  • Loading branch information
agutierrez8 authored May 27, 2023
2 parents 6ab1f71 + be9fda7 commit efd3d92
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/validators/storage_size_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ func (v StorageSizeValidator) MarkdownDescription(ctx context.Context) string {

//nolint:gocritic // Implements Terraform defined interface
func (v StorageSizeValidator) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse) {
if req.ConfigValue.IsNull() || req.ConfigValue.IsUnknown() {
return
}

input := req.ConfigValue.ValueString()
input = strings.ToLower(input)

Expand Down

0 comments on commit efd3d92

Please sign in to comment.