hashicorp/terraform-cdk
Define infrastructure resources using programming constructs and provision them using HashiCorp Terraform
repo name | hashicorp/terraform-cdk |
repo link | https://github.com/hashicorp/terraform-cdk |
homepage | |
language | TypeScript |
size (curr.) | 5567 kB |
stars (curr.) | 1157 |
created | 2020-01-08 |
license | Mozilla Public License 2.0 |
CDK for Terraform
This experimental repository contains software which is still being developed and in the alpha testing stage. It is not ready for production use.
CDK (Cloud Development Kit) for Terraform allows developers to use familiar programming languages to define cloud infrastructure and provision it through HashiCorp Terraform.
Overview
The CDK for Terraform project helps users define infrastructure resources using supported programming languages and generates a Terraform configuration in JSON. Users can then use the Terraform or the CDK for Terraform CLI to deploy the application.
The project uses AWS CDK constructs to define applications.
The CDK for Terraform project 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.
The project currently supports TypeScript, Python, and Java.
Getting Started
Choose a language:
Examples
Typescript
Backends
Python
Java
Documentation
- Install and run a quick start tutorial at HashiCorp Learn
- Using CDK for Terraform CLI for importing Terraform modules and providers.
- Explore the CDK for Terraform CLI.
- Defining Terraform outputs.
- Using Terraform remote backend.
- Using the CDK for Terraform escape hatch.
- Using the CDK for Terraform tokens.
- Using Terraform data sources.
- Using Terraform variables.
- Synthesizing Terraform configuration using CDK for Terraform synthesize command.
- Project telemetry.
- Defining Terraform locals.
- Handling breaking changes with feature flags.
Contributing and Feedback
CDK for Terraform is an early experimental project and 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.
- Public roadmap.
Building
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