https://pulumi.com logo
s

stale-family-94038

09/06/2023, 8:28 AM
Hello guys, I'm just starting out with Pulumi and what a fantastic framework it is. Kudos to you guys. 🙂 I have come across the cli tool tf2pulumi which converts TF config to Pulumi supported languages. But just out of curiosity and a very specific business case, wanted to know if Pulumi can also produce Terraform code from IaC code written with Python, C# or other Pulumi supported languages. If yes, please do route me to that documentation, please.
b

billowy-army-68599

09/06/2023, 12:21 PM
No, pulumi cannot create terraform code, and never will. Terraforms engine is not capable of handling the complexity that Pulumi is capable of handling
I would love to hear more about the specifics though
f

fast-sandwich-30809

09/06/2023, 1:38 PM
Could it be possible to generate TF from a pulumi plan file, as output from a preview operation? That should be deterministic enough - but it would be a one-off operation; unless you could sync tfstate and pulumi state
b

billowy-army-68599

09/06/2023, 1:40 PM
no, the formats are entirely different. Additionally, the way the engine interprets those operations is completely distinct.
I’d love to get an understanding of why TF code specifically is needed.
it’s basically not possible to express Pulumi’s logic in Terraform’s engine.