This message was deleted.
# general
s
This message was deleted.
p
did you check https://www.pulumi.com/docs/guides/adopting/from_terraform/ this should do what you want:
Copy code
const networkState = new terraform.state.RemoteStateReference("network", {
    backendType: "local",
    path: "/path/to/terraform.tfstate",
});
n
thanks @prehistoric-nail-50687, but I think that only works with the state rather than with the original template
when I said Terraform JSON I meant this: https://www.terraform.io/docs/configuration/syntax-json.html , not the actual state
p
…true
b
Pulumi can’t parse Terraform source code but that same documentation talks about a tool used to convert Terraform HCL to Pulumi code.
Oh you mean the JSON alternative specifically. You might be SOL there. Unless you can maybe find a tool or something to convert your TF JSON to TF Native?
👍 1
n
I was wondering if there was something already out there that interprets TF and uses it in Pulumi rather than converting. Surely it would be helpful as a migration/interop library. I may write it myself in .NET if I get some time, just double checking I'm not duplicating work as it sounded like something that could already exist.
b
tf2pulumi is a tool that will convert from terraform HCL to pulumi code
n
@bulky-judge-50216 I tried that, but it crashes when I try to use it, so I decided to try and convert it manually