Open TieyanFu opened 3 months ago
Just found out that there is a section discuss the shim pattern. However, there are still some hoops to jump through. https://github.com/pulumi/pulumi-random/blob/master/provider/go.mod provides a good example.
Hey @TieyanFu. Thanks for raising this. There are definitely hoops to jump through. It sounds like you were able to get unblocked. I'm going to leave this issue as a reminder that we need to improve our documentation here.
It might be worth checking out https://github.com/tmeckel/pulumi-tf-provider-cookiecutter here. It's not officially supported, but it will handle this type of setup for you. It's much closer to "it just works" then the boilerplate is right now.
What happened?
Trying to create a bridged terraform provider for the BTP terraform provider
https://github.com/SAP/terraform-provider-btp/
I pushed my latest changes here
https://github.com/TieyanFu/pulumi-btp/tree/issue_111
In step
make tfgen
, I got following error:The error is understandably correct, since the BTP terraform plugin provider is inside folder internal. However, the folder structure is following the latest terraform provider scaffolding framework template where provider is also inside internal folder.
I had look into a few bridged provider examples:
A quick note: in provider/resources.go it seems the pulumi is trying to reference datasource definition, not necessarily provider itself, not sure if I understand it correctly.
So the questions are:
Example
see above
Output of
pulumi about
CLI Version 3.111.1 Go Version go1.22.1 Go Compiler gc
Host OS darwin Version 14.4 Arch x86_64
Backend Name pulumi.com URL https://app.pulumi.com User Unknown Organizations Token type personal
Pulumi locates its logs in /var/folders/xp/w_dp2zwj1v31p7rsl_qr0zbr0000gn/T/ by default warning: Failed to read project: no Pulumi.yaml project file found (searching upwards from /Users/dxxxxx/Work/k8s/workspace/TerraformProvider/pulumi-btp). If you have not created a project yet, use
pulumi new
to do so: no project file found warning: Failed to get information about the current stack: no Pulumi.yaml project file found (searching upwards from /Users/xxxxx/Work/k8s/workspace/TerraformProvider/pulumi-btp). If you have not created a project yet, usepulumi new
to do so: no project file foundAdditional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).