Skip to content

Commit

Permalink
Check for nil before calling IsKnown()
Browse files Browse the repository at this point in the history
Signed-off-by: Tarun Chinmai Sekar <[email protected]>
  • Loading branch information
tchinmai7 committed Jul 25, 2024
1 parent e295e17 commit 67bd255
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 67bd255

Please sign in to comment.