https://pulumi.com logo
s

stocky-spoon-28903

02/05/2019, 5:40 PM
I think to do this effectively, you’d need to ensure the mapping between names is the same for both types of code. You can reconstitute terraform state with import and ID only refresh as a last resort
b

brainy-magician-83981

02/05/2019, 9:25 PM
Thanks! Yes, the solution will involve
terraform import
. It probably doesn't exists ... but a script that can read a pulumi export state file and execute the appropriate
terraform import
for all the resources to generate the terraform files. This in theory should work I believe 🙂
s

stocky-spoon-28903

02/05/2019, 11:06 PM
It would work - but will need the name mapping to be useful
b

brainy-magician-83981

02/08/2019, 4:53 PM
thanks @stocky-spoon-28903! Just providing an update here ... my team really likes Pulumi but we're not ready to completely drop Terraform ... as with anything, it takes some to evaluate, experiment, and adopt ... and then transition from the old to the new. So a tool that can translate Pulumi stacks to Terraform files will be very useful 🙂
For example, a workflow I'm trying out is as follows: 1) Develop and test with Pulumi for new projects, and 2) Then, create the equivalent Terraform files when we're ready to deploy into production. The Terraform files are stored in our master github repo for all our infrastructure.