Skip to content

Commit 1eb0679

Browse files
committed
Implement EmptyValue() in unlinked action and list schema implementations
1 parent 06909e8 commit 1eb0679

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

action/schema/unlinked_schema.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ package schema
66
import (
77
"context"
88

9+
"github.com/hashicorp/terraform-plugin-go/tftypes"
10+
911
"github.com/hashicorp/terraform-plugin-framework/attr"
1012
"github.com/hashicorp/terraform-plugin-framework/diag"
1113
"github.com/hashicorp/terraform-plugin-framework/internal/fwschema"
1214
"github.com/hashicorp/terraform-plugin-framework/path"
13-
"github.com/hashicorp/terraform-plugin-go/tftypes"
1415
)
1516

1617
var _ SchemaType = UnlinkedSchema{}
@@ -60,6 +61,10 @@ type UnlinkedSchema struct {
6061

6162
func (s UnlinkedSchema) isActionSchemaType() {}
6263

64+
func (s UnlinkedSchema) EmptyValue(ctx context.Context) tftypes.Value {
65+
return fwschema.EmptySchemaValue(ctx, s)
66+
}
67+
6368
// ApplyTerraform5AttributePathStep applies the given AttributePathStep to the
6469
// schema.
6570
func (s UnlinkedSchema) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (any, error) {

list/schema/schema.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ type Schema struct {
6060
DeprecationMessage string
6161
}
6262

63+
func (s Schema) EmptyValue(ctx context.Context) tftypes.Value {
64+
return fwschema.EmptySchemaValue(ctx, s)
65+
}
66+
6367
// ApplyTerraform5AttributePathStep applies the given AttributePathStep to the
6468
// schema.
6569
func (s Schema) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (any, error) {

0 commit comments

Comments
 (0)