The CDK (Cloud Development Kit) for Terraform allows developers to use familiar programming languages to define cloud infrastructure and provision it through HashiCorp Terraform.
Since the 0.2 release roughly a month ago, by far the biggest change was the onboarding of a newly hired full-time engineer. I'm super happy that Ansgar Mertens joined our team and am delighted to see the positive impact he already had on the project.
CDK for Terraform 0.3
We released CDK for Terraform 0.3 recently. Besides from various smaller and bigger improvements, there are two major new features: Remote templates and multiple stacks.
Remote Templates
The cdktf-cli ships with a basic template for each target language. These templates are the blueprint for the project which gets created by running cdktf init, e.g. cdktf init --template typescript.
With remote templates, users can now bring their own template. This enables customized starting points for cdktf projects tailored to the requirements of individual users and organizations.
Multiple Stacks
Up until CDK for Terraform version 0.2 only a single stack per application was supported. Starting with version 0.3, we're now enabling users to model their infrastructure in multiple stacks.
One stack is a collection of infrastructure which will be synthesized as a dedicated Terraform configuration. In comparison to the Terraform CLI, a Stack is equal to a dedicated working directory. Stacks are therefore a boundary to separate state within your infrastructure setup. This can be leveraged to separate a cdktf app in several layers (e.g. Network, Data, Compute), or to manage different versions of the same stack like in the following example.
Define infrastructure resources using programming constructs and provision them using HashiCorp Terraform
CDK for Terraform
Cloud Development Kit for Terraform (CDKTF) allows you to use familiar
programming languages to define cloud infrastructure and provision it through
HashiCorp Terraform. This gives you access to the entire Terraform ecosystem without learning HashiCorp Configuration Language (HCL) and lets you leverage the power of your existing toolchain for testing, dependency management, etc.
We currently support TypeScript, Python, Java, C#, and Go.
CDKTF includes two packages:
cdktf-cli - A CLI that allows users to run commands to initialize, import, and synthesize CDK for Terraform applications.
cdktf - A library for defining Terraform resources using programming constructs.