Skip to content

Commit

Permalink
chore: updated comment for validator
Browse files Browse the repository at this point in the history
  • Loading branch information
anvial committed Aug 6, 2024
1 parent 8c1beae commit 0c493de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/provider/validator_storagedirective.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ func (v stringIsStorageDirectiveValidator) ValidateMap(ctx context.Context, req
}

// If the value of any element is unknown or null, there is nothing to validate.
// Note tha the method is called twice by terraform. The first time it is called with
// unknown values, and the second time with known values.
// If the behavior changes, there is no need to validate all the values.
for _, element := range req.ConfigValue.Elements() {
if element.IsUnknown() || element.IsNull() {
return
Expand Down

0 comments on commit 0c493de

Please sign in to comment.