Ask HN: CDK vs. Terraform – which one do you prefer and why?
1–10 of 19 posts
Re: Ask HN: CDK vs. Terraform – which one do you prefer and why?
#2I'm probably never going to end up switching completely between providers, but I like having the ability to mix and match services if I do need to.
Re: Ask HN: CDK vs. Terraform – which one do you prefer and why?
#3Re: Ask HN: CDK vs. Terraform – which one do you prefer and why?
#4Re: Ask HN: CDK vs. Terraform – which one do you prefer and why?
#5Terraform can get ugly for a large codebase. You have a lot of power with an actual programming language instead of YAML. But CDK is more complicated and the learning curve is higher.
My preference would be Terraform for small-mid sized infra and CDK for larger installations where code abstraction and reuse was more important.
But they both disappoint in their own ways. Orchestration is the great unsolved problem of the cloud.
Re: Ask HN: CDK vs. Terraform – which one do you prefer and why?
#6Depends. Terraform can get ugly for a large codebase. You have a lot of power with an actual programming language instead of YAML. But CDK is more complicated and the learning curve is higher. My preference would be Terraform for small-mid sized infra and CDK for larger installations where code abstraction and reuse was more important. But they both disappoint in their own ways. Orchestration is the great unsolved pr…
To add to that; if you're dealing with multiple cloud providers it's a lot nicer to push a standard configuration, say networking, into a type system. Then you implement interfaces that accept that configuration and handle the provider specific bits.
That way the day-to-day tweaking of the config is the same, regardless of provider.
Re: Ask HN: CDK vs. Terraform – which one do you prefer and why?
#7Definitely Terraform for me: - Vendor agnostic but you do have to write separate code per vendor - Better state management capabilities - Fastest growing dev community in IAC space (except for maybe Pulumi?) - I don't know the current state of CDK but last year imports weren't really supported so there was no way to reconcile state with existing hand rolled infra. Speaks to TF's drift detection being a core capabilit…
wat
Re: Ask HN: CDK vs. Terraform – which one do you prefer and why?
#8Definitely Terraform for me: - Vendor agnostic but you do have to write separate code per vendor - Better state management capabilities - Fastest growing dev community in IAC space (except for maybe Pulumi?) - I don't know the current state of CDK but last year imports weren't really supported so there was no way to reconcile state with existing hand rolled infra. Speaks to TF's drift detection being a core capabilit…
> Vendor agnostic but you do have to write separate code per vendor wat
Re: Ask HN: CDK vs. Terraform – which one do you prefer and why?
#9Re: Ask HN: CDK vs. Terraform – which one do you prefer and why?
#10Definitely Terraform for me: - Vendor agnostic but you do have to write separate code per vendor - Better state management capabilities - Fastest growing dev community in IAC space (except for maybe Pulumi?) - I don't know the current state of CDK but last year imports weren't really supported so there was no way to reconcile state with existing hand rolled infra. Speaks to TF's drift detection being a core capabilit…
> Vendor agnostic but you do have to write separate code per vendor wat