Provisioning the infrastructure using CDK for Terraform

Gugatharsan Sivalingam
6 min readAug 20, 2022
Image from Terraform Website

What is CDK for Terraform(CDKTF)?

CDKTF is Cloud Development Kit for Terraform which allows us to use a familiar programming language to provision infrastructure. Using this we can access the entire terraform ecosystem without learning HashiCorp Configuration Language (HCL). AWS has a similar CDK called AWS CDK which leverages CloudFormation templates (YAML based) behind the scenes. Kubernetes also have another one called CDK8s. These days CDK is becoming a hot topic, I suggest you grasp knowledge about the CDKs depending on your use cases.

CDKTF-supported languages are as follows:

· Typescript

· Python

· Java

· C#

· GO

Image from CDK for Terraform Website

How does CDK for Terraform work?

CDK for Terraform leverages concepts and libraries from the AWS CDK to translate your code into infrastructure configuration files for Terraform. First, you need to create an application using either a built-in or custom template in your preferred language. Then you need to define your infrastructure using your preferred providers…

--

--

Gugatharsan Sivalingam

I’m a tech savvy person who loves to keep myself updated to the current trends of the technology world.