I think to do this effectively, you’d need to ensu...
# general
s
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
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
It would work - but will need the name mapping to be useful
b
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.