When pulumi convert --from terraform runs into a provider it needs that is not available in the Pulumi Registry, it returns an error like:
Converting from terraform...
warning: failed to install provider "helm": could not find latest version for provider helm: 401 HTTP error fetching plugin from https://api.github.com/repos/pulumi/pulumi-helm/releases/latest
Now that we have support for Any Terraform Provider, the convert command could choose to do one of the following when it fails to find a provider it needs:
At least - include a note on running pulumi package add terraform ... to the warning - so that users can easily discover how to handle this wwarning.
Ideally - run this command automatically as a sub-step of the pulumi convert, that results in generating the local SDKs for the dependencies that are not available as part of the generated project.
Working on this now, I have a draft in place that will consist of the following changes:
pulumi-terraform-bridge add a call to return if there is a PulumiProviderName (in plugin_info.go)
if there is none, we need ot convert/pull down the terraform version so read that in il/mapper.go in this project, and if there is one use the main.tf definitions to get the package name (slash and all) to pass back to pulumi/pulumi's mapper.
In pulumi/pulumi when mapping from terraform specifically (convert command) make the installPlugin switch on whether this is native or not. If not use the bridge code (shared in package add) otherwise continue as normal
When
pulumi convert --from terraform
runs into a provider it needs that is not available in the Pulumi Registry, it returns an error like:Now that we have support for Any Terraform Provider, the
convert
command could choose to do one of the following when it fails to find a provider it needs:pulumi package add terraform ...
to the warning - so that users can easily discover how to handle this wwarning.pulumi convert
, that results in generating the local SDKs for the dependencies that are not available as part of the generated project.