thankful-match-46035
02/20/2024, 1:27 PMupgrade-provider ovh/pulumi-ovh
, I have an error:
error: failed to gather package metadata: problem gathering data sources: 1 error occurred:
* Pulumi token "ovh:CloudProjectDatabase/getIpRestrictions:getIpRestrictions" is mapped to TF provider data source "ovh_cloud_project_database_ip_restrictions", but no such data source found. Remove the mapping and try again
make: *** [Makefile:59: tfgen] Error 255
After analyzing our Terraform provider, it appears that the datasource have not disapeared BUT we are currently migrating our resources and datasources to use the new terraform-plugin-framework
instead of old terraform-plugin-sdk/v2
This is the new SDK that should and will be used to declare new resources/datasources.
The terraform provider now uses a mux server that allows to have both SDKs used at the same time (see: https://github.com/ovh/terraform-provider-ovh/blob/master/main.go#L33-L43).
So is it possible to say to Pulumi to take in account resources and datasources declared with the old and the new terraform plugin framework?
FYI, for the moment, we only declared in the new way this datasource:
https://github.com/ovh/terraform-provider-ovh/blob/master/ovh/provider_new.go#L163
but all of the others are still declared in the old way:
https://github.com/ovh/terraform-provider-ovh/blob/master/ovh/provider.go#L50
Is it possible to help us in this issue, because right now we can’t upgrade.sync the pulumi provider.
Thanks 🙂limited-rainbow-51650
02/20/2024, 1:40 PMancient-policeman-24615
02/20/2024, 1:49 PMthankful-match-46035
02/21/2024, 8:53 AMpfbridge
or tfbridge
?ancient-policeman-24615
02/21/2024, 8:56 AMimport (
pfbridge "<http://github.com/pulumi/pulumi-terraform-bridge/pf/tfbridge|github.com/pulumi/pulumi-terraform-bridge/pf/tfbridge>"
"<http://github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge|github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge>"
)
ancient-policeman-24615
02/21/2024, 8:57 AMpfbridge
and tfbridge
.thankful-match-46035
02/21/2024, 9:05 AMancient-policeman-24615
02/21/2024, 9:07 AMancient-policeman-24615
02/21/2024, 9:08 AMancient-policeman-24615
02/21/2024, 9:09 AMmain
function of terraform-provider-ovh
correctly, you would write &ovh.OvhProvider{}
instead of provShim.PFProvider()
.thankful-match-46035
02/21/2024, 9:11 AMovh.New(),
lineancient-policeman-24615
02/21/2024, 9:13 AMovh.New()
. What is the return type of ovh.New()
?thankful-match-46035
02/21/2024, 12:28 PMancient-policeman-24615
02/21/2024, 12:51 PM> Muxed providers need an accompanyingHow to set this up is shown in “How to Upgrade a Bridged Provider to Plugin Framework” (step 4).. If the provider did not have one set up, this is the time to do so.MetadataInfo
ancient-policeman-24615
02/21/2024, 12:51 PMthankful-match-46035
02/21/2024, 12:53 PMancient-policeman-24615
02/21/2024, 12:54 PMgo:embed
to pick up:
echo {} > cmd/pulumi-resource-ovh/bridge-metadata.json
thankful-match-46035
02/21/2024, 12:55 PMancient-policeman-24615
02/21/2024, 12:55 PMDocumentation is not easy to understand and follow 😞I’m sorry. We know and are working on it.
thankful-match-46035
02/21/2024, 12:58 PMthankful-match-46035
02/22/2024, 7:30 AMlimited-rainbow-51650
02/22/2024, 8:16 AMthankful-match-46035
02/22/2024, 8:37 AMthankful-match-46035
02/23/2024, 7:56 AMthankful-match-46035
02/23/2024, 11:43 AMlimited-rainbow-51650
02/23/2024, 11:48 AMancient-policeman-24615
02/26/2024, 11:30 AMancient-policeman-24615
02/26/2024, 11:45 AMthankful-match-46035
02/26/2024, 1:48 PM