Skip to content

Commit

Permalink
Check for nil before calling IsKnown()
Browse files Browse the repository at this point in the history
  • Loading branch information
tchinmai7 committed Jul 25, 2024
1 parent e295e17 commit 2469bac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/external_tfpluginfw.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func (n *terraformPluginFrameworkExternalClient) getDiffPlanResponse(ctx context
// parametrizable attributes.
filteredDiff := make([]tftypes.ValueDiff, 0)
for _, diff := range rawDiff {
if diff.Value1.IsKnown() && !diff.Value1.IsNull() {
if diff.Value1 != nil && diff.Value1.IsKnown() && !diff.Value1.IsNull() {
filteredDiff = append(filteredDiff, diff)
}
}
Expand Down

0 comments on commit 2469bac

Please sign in to comment.