Skip to content

Commit 81b44cf

Browse files
committed
Add ephemeral resource and state store processing to protocol 5 grpcwrap
1 parent a42dc61 commit 81b44cf

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

internal/grpcwrap/provider.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,18 @@ func (p *provider) GetSchema(_ context.Context, req *tfplugin5.GetProviderSchema
7474
Block: convert.ConfigSchemaToProto(dat.Body),
7575
}
7676
}
77-
// Do we add state stores here? Why aren't ephemeral resources here?
77+
for typ, dat := range p.schema.EphemeralResourceTypes {
78+
resp.EphemeralResourceSchemas[typ] = &tfplugin5.Schema{
79+
Version: int64(dat.Version),
80+
Block: convert.ConfigSchemaToProto(dat.Body),
81+
}
82+
}
83+
for typ, dat := range p.schema.StateStoreSchemas {
84+
resp.StateStoreSchemas[typ] = &tfplugin5.Schema{
85+
Version: int64(dat.Version),
86+
Block: convert.ConfigSchemaToProto(dat.Body),
87+
}
88+
}
7889
if decls, err := convert.FunctionDeclsToProto(p.schema.Functions); err == nil {
7990
resp.Functions = decls
8091
} else {

0 commit comments

Comments
 (0)