Skip to content

Commit

Permalink
Match rpc behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
iwahbe committed Apr 24, 2024
1 parent d3ebdf2 commit 508f0de
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion middleware/rpc/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ func (r runtime) propertyToRPC(m resource.PropertyMap) (*structpb.Struct, error)
r.configuration = &rpc.ConfigureResponse{}
}
s, err := plugin.MarshalProperties(m, plugin.MarshalOptions{
KeepUnknowns: r.configuration.SupportsPreview,
KeepUnknowns: true,
KeepSecrets: r.configuration.AcceptSecrets,
KeepResources: r.configuration.AcceptResources,
KeepOutputValues: r.configuration.AcceptOutputs,
Expand Down
9 changes: 9 additions & 0 deletions tests/rpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,19 @@ func TestRPCConfigure(t *testing.T) {
Known: true,
Element: resource.NewProperty("v1"),
}),
"unknown": resource.MakeComputed(
resource.NewProperty(""),
),
}, m)
} else {
assert.Equal(t, resource.PropertyMap{
"known": resource.NewProperty("v1"),
"output": resource.MakeComputed(
resource.NewProperty(""),
),
"unknown": resource.MakeComputed(
resource.NewProperty(""),
),
}, m)
}

Expand Down

0 comments on commit 508f0de

Please sign in to comment.