Skip to main content
Get your first tfts project running in just a few steps.

Prerequisites

Before you begin, make sure you have:

Step 1: Create a new project

Create a new directory and initialize a TypeScript project:

Step 2: Install tfts

Step 3: Create configuration file

Create a cdktf.json file in your project root:
You can also use tfts.json as the configuration file name.

Step 4: Generate provider bindings

Generate TypeScript bindings for your providers:
This creates a .gen directory with fully-typed provider classes.

Step 5: Write your infrastructure

Create a main.ts file:

Step 6: Synthesize and deploy

Synthesize Terraform JSON configuration:
This creates a cdktf.out directory with your Terraform configuration. Navigate to the stack directory and deploy:

Using the CLI

tfts provides commands to streamline the workflow:

Next steps

Core Concepts

Learn about App, Stack, and Constructs.

CLI Reference

Explore all available CLI commands.

Variables and Outputs

Work with Terraform variables and outputs.

Functions

Use Terraform functions in your code.