Top
Best
New

Posted by mfornasa 1 day ago

The future of Terraform CDK(github.com)
87 points | 90 commentspage 2
callumgare 1 day ago|
As an alternative is anyone considering https://sst.dev/ (which uses Pulumi under the hood)? We use it at work and I’ve been quite happy with it
moltar 1 day ago|
It’s not an alternative at all. Terraform CDK is basically TypeScript transpired to HCL. You can codegen TypeScript bindings for any provider. And then write normal TypeScript.
ptdorf 11 hours ago||
> Terraform CDK is basically TypeScript transpired to HCL

transpiled to JSON

dev_l1x_be 1 day ago||
It would be great to have an alternative to Terraform that uses a bit more advanced provider (at last for AWS). Does OpenTofu use that same provider?
jpitz 1 day ago||
The providers for tofu are by design the same as for terraform.

Also, for large providers like AWS, GCP, Azure, etc - these are often largely authored by the hyperscaler themselves, for better or worse.

lijok 1 day ago||
It does. What are you looking for in a more advanced AWS provider?
kbar13 1 day ago||
we're using cdk since 100% of our stuff is in aws but will soon need to hook up some external resources like cloudflare. looked at tfcdk a while back but didn't think it was a good idea (glad). still trying to figure out a good way forward and hoping it's not to rip the bandaid and migrate everything to terraform / pulumi
DangitBobby 1 day ago||
Well that sucks for me.
yearolinuxdsktp 1 day ago||
That’s a real shame. It seems like Pulumi is the only alternative for internal DSLs for IaaC? I always found HCL to be quite terrible, slowly becoming less painful, but not really refactoring-friendly.

Terraform CDK had promise as a blessed infrastructure-as-actual-code solution from the official maintainer of Terraform, so easier to sell internally rather than something from a new vendor like Pulumi. I feel sorry for those teams who have migrated to TF CDK.

Internal vs external DSLs explained in the middle of this page: https://martinfowler.com/bliki/DslQandA.html

chuckadams 1 day ago|
Kubernetes has a few things, including cdk8s. Yoke looks promising too.
jeroensoeters 1 day ago||
[dead]
lijok 1 day ago||
Good move. They clearly didn't have the resources they needed. The design of the CDKs was atrocious.
lloydatkinson 1 day ago||
What was the point of it? Terraform supports AWS anyway.
borisbanjo 1 day ago|
CDKTF works beautifully, all the complains here seem to be from salty devops who got pissed the developers wanted something more powerful than the garbage HCL with its even more garbage module system.

CDKTF stacks are great and the construct pattern gives you modularization without all the baggage.

nevon 19 hours ago||
Not stated in the most diplomatic way, but I do agree. Having used CDK (not cdktf) and now being forced back to Terraform feels like going back to the stone age. It is absolutely obvious to me that generating infrastructure definitions from a regular, testable language using all the same tools, techniques and distribution mechanisms that you use for all your other software development is the superior way. Being able to piggyback off of the vast ecosystem of Terraform providers was a really clever move, although I understand it led to some rough edges.
nijave 1 day ago||
I kind of like it but I always found it kind of clunky how it's ultimately just generating JSON/HCL anyway. For instance, you can't data source then use code to transform and send it to a resource since it has to transpile first.

That also means you end up with things like the language's native JSON not doing what you expect and having to use a special Terraform function call.