Weekly Journal 89 - Pulumi

Pulumi

A quick blurb about Pulumi this week. In my quest to keep my technical skills sharp, I have started a small project to manage all of my personal cloud resources using an Infrastructure-as-Code (IaC) tool. I have been interested in doing something with Pulumi. We use Terraform for IaC at work, but I am intrigued by the idea of using a “real” programming language to manage cloud resources vs. using a specialized declarative language or a mountain of YAML.

Pulumi is interesting because it supports multiple languages including Typescript/Javascript, Python, and Go. Naturally I chose the superior language, namely Python. I am using the Pulumi hosted service to manage my projects and their associated state. Pulumi accounts are free for individual and personal use. As I get more experience with Pulumi, I may shift state management over to something self-hosted.

My first impressions have been positive overall. The documentation isn’t as complete or as nice as Terraform’s, but Terraform is an older and more mature product. I expect Pulumi documentation will improve as the tool matures.

I’ve been using Pulumi to import existing resources into Pulumi state for future management. Pulumi has a neat feature where it will give you the code needed to create and manage a cloud resource when you import it. This saves a lot of time when compared to importing existing resources into Terraform. Terraform will import all the resource information into state, but then you need to try and write the code necessary to manage that resource, and you have to ensure that the code you write matches the state information. Pulumi’s ability to do that automatically is really nice.

I’ll be looking to write more about Pulumi as I get more familiar with it. In particular, I’m interested in using Python language constructs to help define cloud resources with less code. I think there are some really interesting possibilities there, including the ability to embed infrastructure management into other projects.