stephane.bio
  • Invest
  • Build
  • Write
  • Think
Ketchup

hashicorp/terraform-cdk: Define infrastructure resources using programming constructs and provision them using HashiCorp Terraform

URL
https://github.com/hashicorp/terraform-cdk
image
image
image
image
image

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.

image

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.

Get Started

Choose a language:

  • TypeScript
  • Python
  • Java
  • C#
  • Go

Hands-on: Try the tutorials in the CDK for Terraform collection on HashiCorp Learn.

Documentation

Refer to the CDKTF documentation for more detail about how to build and manage CDKTF applications, including:

    d02790de49cd4c6690e4daa7c33eb2eb

    Application Architecture: Learn the tools and processes that CDKTF uses to leverage the Terraform ecosystem and convert code into Terraform configuration files. It also explains the major components of a CDKTF application and how those pieces fit together.

    d0492793cf1a496294809747ac5de62c

    Project Setup: Learn how to create a new CDKTF project from a pre-built or custom template. Also learn how to convert an existing HCL project into a CDKTF application.

    dc27773f62874425a024b8beb41a82da

    Unit Tests: Learn how to test your application in Typescript with jest.

    4de53fa28ad44662ba8400f111d1c18b

    Examples: Reference example projects in every supported language and review explanatory videos and other resources.

Community

The development team would love your feedback to help guide the project.

  • Contribute using the CONTRIBUTING.md guide.
  • Ask a question on the HashiCorp Discuss using the terraform-cdk category.
  • Report a bug or request a new feature.
  • Browse all open issues.

Build

About prerequisites, refer the followings.

Clone the project repository.

git clone https://github.com/hashicorp/terraform-cdk.git

Download dependencies.

cd terraform-cdk/
yarn install

Build the project and packages.

yarn build
stephane.bio

Made with Notion, Published on Super - 2026 Β© Stephane Boghossian

LinkedInInstagramMediumGitHubXBehanceDiscordPinterest