Hello. When trying to convert from terraform to pu...
# general
s
Hello. When trying to convert from terraform to pulumi using
pulumi convert
, I get a bunch of errors related to the provider info, the provider evaluation, 'unknown package "time"' and so on.
Copy code
root@provisioning-node:~/.temp/terraform/omniszienz/1-core# pulumi convert --from terraform --language python
Converting from terraform...
Downloading provider: terraform
Downloading provider: external
Downloading provider: consul
Downloading provider: vsphere
Downloading provider: tls
Downloading provider: local
warning: failed to install provider "time": could not find latest version for provider time: 404 HTTP error fetching plugin from <https://api.github.com/repos/pulumi/pulumi-time/releases/latest>. If this is a private GitHub repository, try providing a token via the GITHUB_TOKEN environment variable. See: <https://github.com/settings/tokens>
warning: /root/.temp/terraform/omniszienz/1-core/main.tf:295,1-50: Failed to get provider info; Failed to get provider info for "consul_acl_token_secret_id": could not find mapping information for provider consul; try installing a pulumi plugin that supports this terraform provider
warning: /root/.temp/terraform/omniszienz/1-core/main.tf:314,1-42: Failed to get provider info; Failed to get provider info for "consul_acl_token_secret_id": could not find mapping information for provider consul; try installing a pulumi plugin that supports this terraform provider
warning: /root/.temp/terraform/omniszienz/1-core/main.tf:186,1-47: Failed to get provider info; Failed to get provider info for "time_sleep": could not find mapping information for provider time; try installing a pulumi plugin that supports this terraform provider
warning: /root/.temp/terraform/omniszienz/1-core/main.tf:249,1-47: Failed to get provider info; Failed to get provider info for "consul_acl_policy": could not find mapping information for provider consul; try installing a pulumi plugin that supports this terraform provider
warning: /root/.temp/terraform/omniszienz/1-core/main.tf:262,1-64: Failed to get provider info; Failed to get provider info for "consul_acl_token_policy_attachment": could not find mapping information for provider consul; try installing a pulumi plugin that supports this terraform provider
warning: /root/.temp/terraform/omniszienz/1-core/main.tf:272,1-45: Failed to get provider info; Failed to get provider info for "consul_acl_token": could not find mapping information for provider consul; try installing a pulumi plugin that supports this terraform provider
warning: /root/.temp/terraform/omniszienz/1-core/main.tf:284,1-44: Failed to get provider info; Failed to get provider info for "consul_acl_token": could not find mapping information for provider consul; try installing a pulumi plugin that supports this terraform provider
warning: /root/.temp/terraform/omniszienz/1-core/main.tf:303,1-36: Failed to get provider info; Failed to get provider info for "consul_acl_token": could not find mapping information for provider consul; try installing a pulumi plugin that supports this terraform provider
warning: /root/.temp/terraform/omniszienz/1-core/main.tf:557,1-40: Failed to get provider info; Failed to get provider info for "time_sleep": could not find mapping information for provider time; try installing a pulumi plugin that supports this terraform provider
warning: /root/.temp/terraform/omniszienz/1-core/main.tf:28,1-18: Failed to get provider info; Failed to get provider info for "consul": could not find mapping information for provider consul; try installing a pulumi plugin that supports this terraform provider
warning: /root/.temp/terraform/omniszienz/1-core/main.tf:28,1-18: Failed to evaluate provider config; Could not evaluate expression for consul:ca_pem
warning: /root/.temp/terraform/omniszienz/1-core/main.tf:28,1-18: Failed to evaluate provider config; Could not evaluate expression for consul:cert_pem
warning: /root/.temp/terraform/omniszienz/1-core/main.tf:28,1-18: Failed to evaluate provider config; Could not evaluate expression for consul:key_pem
warning: /root/.temp/terraform/omniszienz/1-core/main.tf:28,1-18: Failed to evaluate provider config; Could not evaluate expression for consul:token
Converting to python...
Downloading provider: std
================================================================================
The Pulumi CLI encountered a code generation error. This is a bug!
We would appreciate a report: <https://github.com/pulumi/pulumi/issues/>
Please provide all of the below text in your report.
================================================================================
Pulumi Version:   v3.74.0
error: main.pp:8,72-104: unknown package 'template'; unknown package 'template'
warning: main.pp:97,32-50: unknown package 'time'; could not find latest version for provider time: 404 HTTP error fetching plugin from <https://api.github.com/repos/pulumi/pulumi-time/releases/latest>. If this is a private GitHub repository, try providing a token via the GITHUB_TOKEN environment variable. See: <https://github.com/settings/tokens>
warning: main.pp:98,3-17: unsupported attribute 'createDuration'; unsupported attribute 'createDuration'
warning: main.pp:142,3-7: unsupported attribute 'name'; unsupported attribute 'name'
warning: main.pp:143,3-14: unsupported attribute 'datacenters'; unsupported attribute 'datacenters'
warning: main.pp:144,3-8: unsupported attribute 'rules'; unsupported attribute 'rules'
warning: main.pp:147,3-10: unsupported attribute 'tokenId'; unsupported attribute 'tokenId'
warning: main.pp:148,3-9: unsupported attribute 'policy'; unsupported attribute 'policy'
warning: main.pp:154,3-17: unsupported attribute 'nodeIdentities'; unsupported attribute 'nodeIdentities'
warning: main.pp:158,3-8: unsupported attribute 'local'; unsupported attribute 'local'
warning: main.pp:161,3-17: unsupported attribute 'nodeIdentities'; unsupported attribute 'nodeIdentities'
warning: main.pp:165,3-8: unsupported attribute 'local'; unsupported attribute 'local'
warning: main.pp:174,3-17: unsupported attribute 'nodeIdentities'; unsupported attribute 'nodeIdentities'
warning: main.pp:178,3-8: unsupported attribute 'local'; unsupported attribute 'local'
error: main.pp:191,28-60: unknown package 'template'; unknown package 'template'
warning: main.pp:298,26-44: unknown package 'time'; could not find latest version for provider time: 404 HTTP error fetching plugin from <https://api.github.com/repos/pulumi/pulumi-time/releases/latest>. If this is a private GitHub repository, try providing a token via the GITHUB_TOKEN environment variable. See: <https://github.com/settings/tokens>
warning: main.pp:299,3-17: unsupported attribute 'createDuration'; unsupported attribute 'createDuration'
error: main.pp:212,70-102: unknown package 'template'; unknown package 'template'
error: main.pp:167,27-58: unknown function 'consul:index:aclTokenSecretId'; unknown function 'consul:index:aclTokenSecretId'
error: main.pp:180,64-95: unknown function 'consul:index:aclTokenSecretId'; unknown function 'consul:index:aclTokenSecretId'
error: could not generate output program: failed to bind program
The original terraform code is working without any issues. I would have appreciated even a partial conversion actually and I could have tried to understand the differences myself. Any ideas how I should proceed here?
e
Can you raise an issue for this at github.com/pulumi/pulumi/issues. You can just copy the output you've pasted here, just means it doesn't get lost in slack history. We'll need to look into why those missing functions are triggering an error rather than just a warning and giving a partial conversion.
s
Thank you 🙂 I will.