Bootstrapping Pulumi Backends
As the old adage goes, "when you have a hammer, everything looks like a nail." Adapting this to the past few years of my life, "when you have golang, use it for everything." So when I started writing a new highly automated IAC project for a managed cloud service, I immediately reached for Go.
After a bit of prototyping with already familiar tools like Terraform and Ansible, I wanted to consolidate my source of truth. This way, I could keep as much logic as possible in Go, driven by a single config file that acts as the source of truth, without writing various translation layers for terraform and ansible variables.
Of course, I've heard about Pulumi, but haven't given it much thought. I had mistakenly assumed that it was simply a wrapper over Terraform, similar to CDK. But, I was hitting the limits of my homegrown, hclwrite-based Terraform module generator and I know that Go is a first class language in Pulumi, so I decided to give it a shot.
So far, I've been impressed with Pulumi's execution engine and the ease in which it integrates into traditional software applications. Go also adds some of its own benefits, such as generating a multi-arch compiled binary with no dependencies (outside of a Pulumi executable), static typing, and strong concurrency primitives that fit easily into Pulumi's view of the world.
https://gist.github.com/sklarsa/32d5ba00732fd6be375258bb8b723ab2 gist for bootstrap code