Live data from Hacker News

Forget CDK and AWS's insane costs. Pulumi and DigitalOcean to the rescue

github.com

71–80 of 172 posts

Re: Forget CDK and AWS's insane costs. Pulumi and DigitalOcean to the rescue

#71
post #55
post #41

Earlier quoted context omitted.

As much as I like it, I find C# to be too inflexible of a language for infrastructure code. I tried with Pulumi for a while but moved to TypeScript as it works so much better. Structural typing makes your life a lot easier.

I bounce back and forth between javascript and C# depending on the nature of the job at hand. I'm curious what things you'd like to do with C# that you can't? I find that with some handwringing, C# can be forced to do almost anything. between extension methods, dispatch proxies and reflection you can pummel it into basically any shape. Having to write a little boilerplate to make it happen can be a drag though. I do…

It's not the fault of the language, it's just the nature of infrastructure code that's been ported from terraform. With Pulumi C# you end up with multiple nested objects/dictionaries with a load of `new` object calls that just add noise to your codebase. There's also some pain points with some types being Input which IDEs try to autocomplete when in reality you need to call `new T()`. Typescript permits structural typing that _feels_ a lot better to write and read within this context.

I use C# extensively for most other things I do, but this the one area where I prefer not to use it.

Re: Forget CDK and AWS's insane costs. Pulumi and DigitalOcean to the rescue

#72

I wish CDK was fully baked enough to actually use. It's still missing coverage for some AWS services (sometimes you have to do things in cloudformation, which sucks) and integrating existing infra doesn't work consistently. Oh and it creates cloudformation stacks behind the scenes and makes for troubleshooting hell.

CDK is an abomination and I'm not sure why AWS is pushing it now. A few years ago all their Quick Starts were written in CloudFormation, now it's CDK that compiles to CloudFormation. Truly a bad idea.

Just write CloudFormation directly. Once you get the hang of the declarative style and become aware of the small gotchas, it's pretty comfy.

Re: Forget CDK and AWS's insane costs. Pulumi and DigitalOcean to the rescue

#73
post #63

Earlier quoted context omitted.

As SRE dealing with former Pulumi, "Hey Devs can use code to deploy infrastructure" is not great idea you think it is. I've seen some real ugly conditional behavior where I'm like "Is this or is this not going to run? I honestly can't tell."

We had so much conflict with the ops team over their choice of Terraform. The three colors of variable thing is just fucking bonkers. Getting tests wrapped around it that actually did what we thought they meant was a giant pain in the ass. I won't go as far as to say we burned bridges arguing back and forth about it but they were definitely significantly singed. Config files simply don't work until they do. And if it…

Ever thought that "Ops" needs a different mindset than the devs are used to ?

Re: Forget CDK and AWS's insane costs. Pulumi and DigitalOcean to the rescue

#74
For anyone deliberating between Pulumi and CDK let me recommend what I consider the best of both worlds: CDKTF, Hashicorp’s answer to Pulimi (my quote not theirs).

It’s got everything you want:

- strong type system (TS),

- full expressive power of a real programming language (TS),

- can use every existing terraform provider directly,

- compiles to actual Terraform so you can always use that as an escape hatch to debug any problems or interface with any other tools,

- official backing of Hashicorp so it’s a safe bet

It’s a super power for infra. If you have strong software dev skills and you want to leverage the entire TF ecosystem without the pain of Terraform the language, CDKTF is for you.

(No affiliation)

https://developer.hashicorp.com/terraform/cdktf

Re: Forget CDK and AWS's insane costs. Pulumi and DigitalOcean to the rescue

#75

For anyone deliberating between Pulumi and CDK let me recommend what I consider the best of both worlds: CDKTF, Hashicorp’s answer to Pulimi (my quote not theirs). It’s got everything you want: - strong type system (TS), - full expressive power of a real programming language (TS), - can use every existing terraform provider directly, - compiles to actual Terraform so you can always use that as an escape hatch to debu…

How is compiling to terraform a positive? I'd rather debug python than python-compiled-to-terraform.

Re: Forget CDK and AWS's insane costs. Pulumi and DigitalOcean to the rescue

#76
post #75

For anyone deliberating between Pulumi and CDK let me recommend what I consider the best of both worlds: CDKTF, Hashicorp’s answer to Pulimi (my quote not theirs). It’s got everything you want: - strong type system (TS), - full expressive power of a real programming language (TS), - can use every existing terraform provider directly, - compiles to actual Terraform so you can always use that as an escape hatch to debu…

How is compiling to terraform a positive? I'd rather debug python than python-compiled-to-terraform.

Because you can use that to interface with existing tooling. Terraform has a huge and established ecosystem and it’s an uphill battle to compete with it. It’s risky to bet your infra on a tech that tries to drink the ocean and supplant the entire thing. Meanwhile if you compile down to TF you get to use a different language without having to pay the cost of moving out of the tf ecosystem. And given that the language itself is by far the worst thing about terraform that’s a big win.

It turns out terraform is actually quite acceptable when you slap a decent language on top of it. Passable, even :)

Re: Forget CDK and AWS's insane costs. Pulumi and DigitalOcean to the rescue

#77
post #75

For anyone deliberating between Pulumi and CDK let me recommend what I consider the best of both worlds: CDKTF, Hashicorp’s answer to Pulimi (my quote not theirs). It’s got everything you want: - strong type system (TS), - full expressive power of a real programming language (TS), - can use every existing terraform provider directly, - compiles to actual Terraform so you can always use that as an escape hatch to debu…

How is compiling to terraform a positive? I'd rather debug python than python-compiled-to-terraform.

In an AWS scenario I can think of:

Pro vs pulumi: you get a declarative template to debug and review

Pro vs CDK: The declarative template is applied via APIs instead of CloudFormation. The CDK CloudFormation abstraction leaks like hell

Re: Forget CDK and AWS's insane costs. Pulumi and DigitalOcean to the rescue

#78
Why's everyone going away from declarative? Terraform, CloudFormation, AWS Copilot etc have a lot of virtues and are programming language agnostic.

Using a complex programming language (C++ of the browser world) just for this has a big switching cost. Unless you're all in on TS. And/or have already built a huge complex IaC tower of babel where programming-in-the-large virtues justify it.

Re: Forget CDK and AWS's insane costs. Pulumi and DigitalOcean to the rescue

#79
post #75

Earlier quoted context omitted.

How is compiling to terraform a positive? I'd rather debug python than python-compiled-to-terraform.

Because you can use that to interface with existing tooling. Terraform has a huge and established ecosystem and it’s an uphill battle to compete with it. It’s risky to bet your infra on a tech that tries to drink the ocean and supplant the entire thing. Meanwhile if you compile down to TF you get to use a different language without having to pay the cost of moving out of the tf ecosystem. And given that the language…

Makes sense! Except for one little thing..

We've been migrating off of Terraform at BigCo recently and it has been a tremendous success. The migration has saved countless hours. Before, I was jaded and routinely in the office until 8 or 9 or so manually running terraform deploys for our engineering teams in India. Now, thanks to Pulumi, I'm able to leave the office at 7:30-8 -- and I can tell you single handed that this has saved my relationship with my daughter and maybe even my marriage. I'm running the fastest for loops thanks to Pulumi. We actually compile our Python down to c and use the Pulumi C SDK for insane speed benefits when we loop over our datacenter arrays. Turns out, not having bounds checks shaves off valuable time that I would otherwise be spending with my daughter. Routinely I'd be waking up screaming at 4 in the morning due to Terraform (or, what we would refer to as Tearaform because all of the infra engineers were constantly in tears). Now, I can sleep soundly until 5:30.

Re: Forget CDK and AWS's insane costs. Pulumi and DigitalOcean to the rescue

#80
post #78

Why's everyone going away from declarative? Terraform, CloudFormation, AWS Copilot etc have a lot of virtues and are programming language agnostic. Using a complex programming language (C++ of the browser world) just for this has a big switching cost. Unless you're all in on TS. And/or have already built a huge complex IaC tower of babel where programming-in-the-large virtues justify it.

Because they like to spend endless hours debugging infrastructure builds.
Post reply on HN