Skip to content

Commit

Permalink
fix: change to 'DynamicParameter' in terraform plugin sdk 1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bschaatsbergen committed Mar 31, 2024
1 parent eb6d6f2 commit a157846
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/provider/not_null_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (r NotNullFunction) Definition(_ context.Context, _ function.DefinitionRequ
resp.Definition = function.Definition{
Summary: "Checks whether a given object is not null",
Parameters: []function.Parameter{
function.ObjectParameter{
function.DynamicParameter{
AllowNullValue: true,
AllowUnknownValues: true,
Description: "The object to check",
Expand All @@ -40,7 +40,7 @@ func (r NotNullFunction) Definition(_ context.Context, _ function.DefinitionRequ
}

func (r NotNullFunction) Run(ctx context.Context, req function.RunRequest, resp *function.RunResponse) {
var data types.Object
var data types.Dynamic

resp.Error = function.ConcatFuncErrors(req.Arguments.Get(ctx, &data))
if resp.Error != nil {
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/null_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (r IsNullFunction) Definition(_ context.Context, _ function.DefinitionReque
resp.Definition = function.Definition{
Summary: "Checks whether a given object is null",
Parameters: []function.Parameter{
function.ObjectParameter{
function.DynamicParameter{
AllowNullValue: true,
AllowUnknownValues: true,
Description: "The object to check",
Expand All @@ -40,7 +40,7 @@ func (r IsNullFunction) Definition(_ context.Context, _ function.DefinitionReque
}

func (r IsNullFunction) Run(ctx context.Context, req function.RunRequest, resp *function.RunResponse) {
var data types.Object
var data types.Dynamic

resp.Error = function.ConcatFuncErrors(req.Arguments.Get(ctx, &data))
if resp.Error != nil {
Expand Down

0 comments on commit a157846

Please sign in to comment.