News for hackers. Stuff that matters.
Re:Terraform vs. AWS CloudFormation by zenlot on Wednesday October 06, 2021 @07:11PM (#28779656)
I came here to say that Pulumi is the answer, but people already mentioned it. It's TF under the hood, some of the docs links even refer to the links in TF documentation [not intentionally, just by copy and paste], but they made the experience so much better. Writing code in Typescript and seeing your infrastructure provisioned with all the goodies Pulumi added on top of TF is pure joy. No more HCL, or other "here's my DSL, learn it" scenarios.
Re:Terraform vs. AWS CloudFormation by bleepblooop on Wednesday October 06, 2021 @09:51PM (#28780861)
Pulumi is not "Terraform under the hood" in any sense than that some of the providers are forks of Terraform providers.

The engine is entirely separate and, now that they have a foothold with it, they are building out providers that are built around the Pulumi execution model first-class, rather than an adapter layer.

One notable core difference in the Pulumi model is that it doesn't have "plan" in the same sense that Terraform does, where the set of actions is fixed and just executed once you accept it, returning an error if that turns out not to be possible.

"pulumi preview" just runs the program in a dry-run mode, so there's no guarantee that the subsequent apply will match unless you've been careful to write a totally deterministic program that always behaves the same with placeholder values as it does for concrete values.

That's a typical tradeoff for using a DSL vs. a general-purpose language though, and one that seems to pay off for a lot of teams.

Re:Terraform vs. AWS CloudFormation by zenlot on Friday October 08, 2021 @06:35PM (#28804915)
Commenting as an employee, with the account created for that purpose? It's not true what you're saying, but it's good that you're going that route. As I've said, I am a user of Pulumi, and you're doing loads of things good, just don't try to discard that you started as "TF under the hood".
Re:Terraform vs. AWS CloudFormation by bleepblooop on Saturday October 09, 2021 @07:53PM (#28814416)
I don't and never have worked at Pulumi, but I've read the open source code and can see that the Pulumi engine is distinct from what HashiCorp seems to call "Terraform CLI" or "Terraform Core".

But there are indeed repositories in their GitHub org which started as forks of Terraform providers, as I said. Pretty good strategy to start from all of the generic glue code somebody else already wrote and then adapt it to a new engine, because that's the undifferentiated heavy lifting that needs to be done regardless of the engine design.

Re:Terraform vs. AWS CloudFormation by FridgeSeal on Wednesday October 06, 2021 @10:46PM (#28781236)
I’ve seen teammates write enough impenetrable JS/Python/ etc code that I’m pretty comfortable saying I want none of that near the machinery that provisions potentially expensive amounts of infrastructure.

I like that HCL is declarative and deliberately restricted in what’s possible, it means I never have to think about some dev writing “clever” code or over abstracting things, or writing bugs that spin up to many machines.

Re:Terraform vs. AWS CloudFormation by midnightblue on Saturday October 09, 2021 @04:56AM (#28808177)
HCL being so restricted is the reason why many teams feel the need to implement a layer on top of it.

Once you’re working with HCL templated via Gomplate or what have you, and a pipeline which processes the code base and then spits out the resultant HCL as an artifact to be used by a subsequent step, you’ll pine for the impenetrable JS or Python code. At least that is code which has a reasonable development workflow associated with it, not a monstrosity held together with duct tape and vulgar hacks.

Re:Terraform vs. AWS CloudFormation by Hawxy on Wednesday October 06, 2021 @10:59PM (#28781318)
I recently did a comparison of Pulumi and CDK. Pulumi's AWS abstractions are sadly nowhere near as good as CDK patterns, resulting in far more code needing to be written for the same result. I've also noticed that Pulumi seems to have a hard time accurately tracking state for AWS resources.

Pulumi does work very well in the Azure space as Azure resources are already well abstracted.

Re:Terraform vs. AWS CloudFormation by nsonha on Wednesday October 06, 2021 @07:58PM (#28780008)
if it's Tf under the hood then could it be better than than TF's own CDK?
Re:Terraform vs. AWS CloudFormation by narism on Wednesday October 06, 2021 @08:34PM (#28780277)
The Pulumi providers for major clouds (AWS/GCP/Azure) have native versions instead of using the TF providers under the hood. Caveat: some are still in preview.

https://www.pulumi.com/blog/pulumiup-native-providers/