Skip to content

Commit

Permalink
fix predicate validation to accept interpolated values on predicate v…
Browse files Browse the repository at this point in the history
…alue field (#497)
  • Loading branch information
davidbloss authored Oct 2, 2024
1 parent 16e016d commit df15489
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changes/unreleased/Bugfix-20241002-090048.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Bugfix
body: fix predicate validation to accept interpolated values on value field
time: 2024-10-02T09:00:48.502724-05:00
2 changes: 1 addition & 1 deletion opslevel/resource_opslevel_check_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ var predicateType = map[string]attr.Type{

func (p PredicateModel) Validate() error {
// Skip validation for now, when input variables or for loops are used
if p.Type.IsUnknown() || p.Type.IsNull() {
if p.Type.IsNull() || p.Type.IsUnknown() || p.Value.IsUnknown() {
return nil
}
predicate := opslevel.Predicate{
Expand Down

0 comments on commit df15489

Please sign in to comment.