DEV Community

Yuval Greenfield
Yuval Greenfield

Posted on

Terraform vs Pulumi

On the face of it Terraform and Pulumi are the same thing. They let you write code that defines your cloud setup. When you modify that code - they will update your cloud setup accordingly.

Terraform vs Pulumi on Github

https://star-history.com/#pulumi/pulumi&hashicorp/terraform&Date

(for some reason this image is looking broken when I embed it)

  • https://github.com/pulumi/pulumi - Infrastructure as Code in any programming language. Build infrastructure intuitively on any cloud using familiar languages
  • https://github.com/hashicorp/terraform - Terraform enables you to safely and predictably create, change, and improve infrastructure. It is an open source tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.

The subtle lock-in difference

Pulumi allows you to write the code in your programming language of choice, which is going to be far more expressive. Terraform requires you use a simplistic configuration language.

A consequence of this difference is that it's easy to migrate from Terraform configuration files to Pulumi. But it's going to be extremely difficult to migrate from Pulumi to anything else.

Caveats and conclusions

I personally only used Terraform and it was a bit tricky to learn at the time. Pulumi's idea of using a more capable language to manage infrastructure intrigues me. It seems the idea is so powerful that it might be worth it to take the risk of never being able to migrate off of it. I'll post an update after I try it. Please let me know of lessons you already have from real life experiences with these two.

Top comments (0)