:wave: can anyone help me to understand why `make ...
# pulumiverse
g
đź‘‹ can anyone help me to understand why
make tfgen
is generating a wrong schema? It looks like the upstream provider changed something and now the generated
schema.json
is wrong
b
@great-sunset-355 Which provider repo?
g
I am trying to update https://github.com/pulumiverse/pulumi-sentry to the latest version
the original provider changed from manually written resource files to generating the structure from OpenAPI spec And I do not understand
tfgen
yet enough but it seems, to only scan
sentry
folder and not the
internal
which contains the resources https://github.com/jianyuan/terraform-provider-sentry/tree/main/internal/provider
Today I also tested the
pulumi package add terraform-provider jianyuan/sentry
which has generated the correct structure but the generated code could not run in my environment because it seemed to rely on
npm
and other things 🤦
b
@great-sunset-355 let me check out the pulumi-sentry repo so that I can get a clearer picture for myself
g
I think I get it, I may have to do all this ie. migrate to the plugin framework https://github.com/pulumi/pulumi-terraform-bridge/blob/master/docs/guides/upgrade-sdk-to-mux.md because this says commit mentions something about it https://github.com/jianyuan/terraform-provider-sentry/commit/91ab53f8446c345e4175339856bbcd15182e8a75
b
@great-sunset-355 Okay, I see the issue. As you described they moved the TF provider resources (as best practice) into an internal package. You now need to create a SHIM implementation that can be instantiated by the Pulumi Terraform Bridge to wrap the provider. You can have a look at the pulumi-time or pulumi-mssql providers on pulumiverse to see how this has to be implemented.
Oh and if they moved to the plugin framework you have to switch the Pulumi Terraform Bridge from the v2 package to the pf package. The pulumi-time provider is then the correct reference for both of the issues you face: internal provider package and Plugin Framework.
You can make your life easier if wrap the current TF sentry provider with my Cookiecutter Template which automatically creates the SHIM and supports the Plugin Framework.
g
is there any high level overview of what do I need to do? I am not super familiar with GoLang and scouting “random” source code for solutions will cost me a lot of time
b
As said either you look at other Pulumi providers e.g. on Pulumiverse like the pulumi-time provider or you take this blog post as a reference https://www.speakeasy.com/post/pulumi-terraform-provider
g
Thanks, I read the second one already
so I might get it to work somehow