
Let’s begin with why I choosed Pulumi rather than Terraform?
I use to be a full stack Javascript developer. I love working with Javascript certainly with appearance of the standard ECMA6 (OOP). Back to the future, Me and my team has been assigned to choose the best tool to automate our environments (DEV, STAGING, PRODUCTION). We had 2 options. Either we go with the classic Tool that everyone is using Terraform or choose the new tool Pulumi. At first, I give a shot to Terraform and tried to see what’s in hood. It uses HCL language (declarative language) and I didn’t liked very much but there’s something good on it (module management). The reuse of module can give more flexibility to manage my code. The down side, I think in my understanding is dependencies management is very poor maybe because I’m not in it from the beginning 🙂 .
What give me Pulumi?
From perspective, I like Pulumi because it’s the same language I speak (Javascript/Typescript). When I say programming language, their a lot of feature come with it:
- Reusable code/libraries
- Use existing node modules / services like momentJs/lodash
- You can used with your prefered language (C#, Python…)
- Has a lot of standalone libraries (Azure-native/Kubernetes/Aws…)
- Code validation (typing…)
Pulumi doesn’t only offer you a creation of infrastructure but All-in-one. Let me explain what we have done.
First, Pulumi create a common resources for all infrastructures, then It create the environment and prepare all the resources.
Next step, it create all permissions/IAM for all the resources to give the required permissions for each Group AD. For example, QA team need to be reader for the resource group of Staging.
There’s a stage is optional that depend on the situation. In this stage, Pulumi create all databases/collections for db account, topic/subscription for ServiceBus and keyvault secrets.
The final stage is called POST ENVIRONMENT. In this stage, Pulumi prepare AKS requirements. It adds the missing Config map/secrets and start Gitops using Flux (there’s a lib for it).
And you are good to go with the environment.
Back to feedback
Pulumi is a powerful tool that can help in every step of deploying your services. I highly recommend this tool.