Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs migration-to-pulumi-from-terraform page Inadequate #3265

Closed
Yuhta28 opened this issue Aug 16, 2023 · 2 comments · Fixed by #3281
Closed

Docs migration-to-pulumi-from-terraform page Inadequate #3265

Yuhta28 opened this issue Aug 16, 2023 · 2 comments · Fixed by #3281
Assignees
Labels
area/docs Improvements or additions to documentation kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@Yuhta28
Copy link

Yuhta28 commented Aug 16, 2023

File: themes/default/content/docs/using-pulumi/adopting-pulumi/migrating-to-pulumi/from-terraform.md

On the Migrating from Terraform to Pulumi pages, the method for importing an existing resource as described, but the import did not work.
In the document, import.ts file in the already archived tf2pulumi repository is copied to the execution directory to synchronize .tfstate file information with Pulumi, but when pulumi up command is executed, the following error was displayed.

pulumi up

     Type                 Name                   Plan       Info
 +   pulumi:pulumi:Stack  temp-pulumi-import-s3  create     1 error
 fail
Diagnostics:
  pulumi:pulumi:Stack (temp-pulumi-import-s3):
    error: Running program 'C:\Users\~~~~\' failed with an unhandled exception:
    Error: Only version '3' tfstate files currently supported: 4
        at Object.<anonymous> (C:\Users\~~~~\import.ts:81:35)
        at Module._compile (node:internal/modules/cjs/loader:1254:14)
        at Module.m._compile (C:\Users\~~~~\node_modules\ts-node\src\index.ts:439:23)
        at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
        at Object.require.extensions.<computed> [as .ts] (C:\Users\~~~~\node_modules\ts-node\src\index.ts:442:12)
        at Module.load (node:internal/modules/cjs/loader:1117:32)
        at Function.Module._load (node:internal/modules/cjs/loader:958:12)
        at Module.require (node:internal/modules/cjs/loader:1141:19)
        at require (node:internal/modules/cjs/helpers:110:18)
        at Object.<anonymous> (C:\Users\~~~~\index.ts:1:1)

I think that the import.ts file is archived, so version 4 tfstate files cannot be supported. How can I solve this problem?

@github-actions github-actions bot added the needs-triage Needs attention from the triage team label Aug 16, 2023
@interurban interurban added the area/docs Improvements or additions to documentation label Aug 22, 2023
@interurban
Copy link
Collaborator

Hello @Yuhta28 thanks for submitting this issue as we look into it, if you want more real-time help or if your feeling blocked we have a vibrant community on Slack and our community engineers can help get you unstuck. https://slack.pulumi.com/

@lukehoban
Copy link
Member

This is the same issue that had been tracked in pulumi/tf2pulumi#241. However, we've since moved to a new model for conversion from Terraform as part of https://www.pulumi.com/blog/converting-full-terraform-programs-to-pulumi/. That new model does not yet have a replacement for the state conversion. We are tracking adding that in pulumi/pulumi#5953 (comment) and pulumi/pulumi-converter-terraform#23.

In the meantime, we will want to update the docs here to not point at the archived (and not currently working for v4 state) import scripts.

@justinvp justinvp added kind/bug Some behavior is incorrect or out of spec and removed needs-triage Needs attention from the triage team labels Aug 22, 2023
@justinvp justinvp self-assigned this Aug 22, 2023
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs Improvements or additions to documentation kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
Status: 🏁 Done
Development

Successfully merging a pull request may close this issue.

5 participants