Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add func rpc.Provider(pulumirpc.ResourceProviderServer) p.Provider #220

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

iwahbe
Copy link
Member

@iwahbe iwahbe commented Apr 16, 2024

rpc.Provider provides a thunking layer to allow a pulumi-go-provider based provider to wrap a pulumirpc.ResourceProviderServer. This will allow piece-wise transfer of native providers to the pulumi-go-provider framework.

Unlike the pulumi-terraform-bridge's
muxer, rpc.Provider does not split at the RPC level directly. Instead it converts the shim layer provided by https://github.com/pulumi/pulumi-go-provider back into "github.com/pulumi/pulumi/sdk/v3/proto/go". This makes wrapped rpc providers able to interact with integration based tests and to benefit from intercepting middleware (like cancel and schema).

Fixes #216

`rpc.Provider` provides a thunking layer to allow a pulumi-go-provider based provider to
wrap a `rpc.ResourceProviderServer`. This will allow piece-wise transfer of native
providers to the pulumi-go-provider framework.

Unlike the pulumi-terraform-bridge's
[muxer](https://github.com/pulumi/pulumi-terraform-bridge/tree/master/x/muxer),
`rpc.Provider` does not split at the RPC level directly. Instead it converts the shim
layer provided by https://github.com/pulumi/pulumi-go-provider back into
"github.com/pulumi/pulumi/sdk/v3/proto/go". This makes wrapped rpc providers able to
interact with `integration` based tests and to benefit from intercepting middleware (like
`cancel` and `schema`).

Fixes #216
@iwahbe iwahbe requested review from danielrbradley, blampe and a team April 16, 2024 11:17
@iwahbe iwahbe self-assigned this Apr 16, 2024
@iwahbe iwahbe changed the title Add func rpc.Provider(rpc.ResourceProviderServer) p.Provider Add func rpc.Provider(pulumirpc.ResourceProviderServer) p.Provider Apr 16, 2024
@iwahbe iwahbe merged commit 7cf0e0a into main Apr 17, 2024
6 checks passed
@iwahbe iwahbe deleted the iwahbe/216/project-raw-rpc-provider branch April 17, 2024 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support transition from a hand-written native provider to a framework based provider
2 participants