3

I am having difficulty in understanding whether to use aws cdk or terraform cdktf. From my work so far, it appears to me that aws cdk has more robust patterns and constructs which will comply with the well architected framework, all available out of the box. Terraform cdktf will require hand crafting many of such constructs and patterns.

An example in point is the construct ecs_patterns.ApplicationLoadBalancedEc2Service which does a lot of heavy lifting in spinning up a industrial strength infrastructure for EC2 based ECS service. I can't find the equivalent of that in Terraform cdktf and it appears I will have to manually assemble and connect all the infra elements.

However, Terraform apparently has the advantage of working with several different cloud vendors, and therefore I want to do due diligence before choosing one of the other.

Therefore, I would like to know if my understanding is correct and if I am not missing something really important. Any other advice / considerations in this matter are highly appreciated

Thanks

d4nyll
  • 11,811
  • 6
  • 54
  • 68
Chubsdad
  • 24,777
  • 4
  • 73
  • 129
  • 7
    Personally I would compare Terraform and Cloudformation directly first, as the cdks are basically wrappers for the underlying engines if I understand correctly. The differences between the engines (like multi-cloud, state auto-sync and import capabilities and so on) are likely to be more important than the differences between the cdks. – T.H. Sep 25 '20 at 11:39
  • Had the same issue, personally I feel Terraform CDK is absolutely not mature compared to AWS CDK. Either continue to use good old Terraform (not CDK) or AWS CDK. My two cents – wiwa1978 Jun 23 '21 at 13:12
  • I found this article a good read: https://medium.com/swlh/cdk-or-terraform-88a464bedf9e – Daniel Viglione Jan 16 '23 at 17:30

1 Answers1

2

The AWS CDK is limited to only AWS as a cloud, whereas you can use CDKTF with any / most of the clouds since terraform providers exist for most of them. The AWS CDK has a diverse ecosystem of constructs that can be used, which is a plus. CDKTF will eventually support these via the CDKTF AWS Adapter.

Daniel Schmidt
  • 11,605
  • 5
  • 38
  • 70