r/devops • • Dec 20 '22
How does pulumi compare with cdk?
I know pulumi works with multiple cloud providers, let's say I want to just use AWS as the underlying cloud, how does this compare with CDK?
We are using CDK at the company I am working at with python, most of the time it works, but when it does not, it gives some obscure errors, which are comprehensible
Is it the same with pulumi? Do you recommend using pulumi with go? as it's written in go or any other language like python or typescript is fine?
About me:
I have 7 years of exp in backend development and have been doing microservices for the past 2 years. My goal is to learn to set up systems, deployments, ci, cd etc
13
u/jaxxstorm Dec 20 '22
CDK and Pulumi provide you with essentially the same authoring experience. You can express your infrastructure quickly and cleanly in your language of choice.
The execution experience is very very different. As I’m sure you know, CDK just spits out artifacts like a cloudformation template.
Pulumi is way more flexible. You can embed Pulumi into other applications using automation API, for example.
I wrote about this at length here: https://leebriggs.co.uk/blog/2022/08/26/choosing-an-iac-tool.html
[disclaimer: I’m a Pulumi employee]
7
u/jordanrinke Dec 20 '22
It is going to be a hard sell to switch from CDK to Pulumi, the pitch to move from TF to Pulumi is a bit easier but that depends on how much legacy stuff you have. Functionally on AWS you can do the same thing with them, however, weird things happen with the cloud formation stacks when using CDK. Pulumi is more "native" and you get errors that make sense, single things fail etc. We switched from CDK to Terraform to Pulumi over the last couple of years and are very happy with Pulumi. We still find some rough edges now and then but it works well.
We use Pulumi with Python + Pydantic because at the time the teams working with it had more Python chops than anything else.. Typescript is probably first choice (because some of Pulumi's async stuff pushes you into some python anti-patterns or at least unusual looking python code), then Python with type hints, Go after that. Only because the Go code (to me at least) seems overly lengthy and complex. If you are more familiar with it than any other language then go for it.
CDKTF is another offering very similar to Pulumi but the Pulumi SaaS makes a really nice all in one solution that was the major selling point for us. Made onboarding/switching super easy. We didn't have to glue anything together.
We work with them a fair bit and I am a fan of the product and support team so, I am a bit biased.
2
u/ilet Dec 20 '22
I really like Pulumi - I've used it for Azure and GCP, and I almost always use Python with it since I'm still not very strong in Go. The error reporting is a lot like Terraform in that sometimes it's helpful and sometimes it's a bit misleading (especially on the providers they borrow from TF), but overall I like it for multi-cloud.
2
u/[deleted] Dec 20 '22
Consider looking at TFCDK it has way bigger community that any of the tools in post and will most likely be “the next goto” for infrastructure.
Solutions like that need huge community to survive time.
0
u/[deleted] Dec 20 '22
[deleted] — view deleted comment