Tutorials
Follow these hands-on tutorials:Example Projects
The Terraform Registry and OpenTofu Registry have more information about all of the providers in the following examples.
Typescript
Backends
Each CDK Terrain project can specify a backend that defines where and how Terraform operations are performed, where Terraform state snapshots are stored, etc.Python
Java
Gradle
Maven
C Sharp
Go
Youtube Playlist
- Our official playlist contains a set of videos from community office hours to deep dives into technical topics
- CDK Day 2022 - Hybrid Constructs: How to build CDKTN abstractions that cooperate with your HCL
- The CDKTN engineering team builds a simple end to end serverless application in an end to end livestream
- Getting Started with CDK Terrain and Python, by Charles McLaughlin of ShopStyle
- Extending constructs of the CDK Terrain
Release demos
- 0.4: Go support, Asset construct, Terraform Cloud (now HCP Terraform) integration. This includes a Google Kubernetes Engine demo.
-
0.5: Convert and watch command demos
If you are interested in extending the
cdktn convertcommand, you may also be interested in the convert deep dive. You do not need to watch this video to use theconvertcommand successfully. - 0.6: Snapshot testing
Pocket public codebase
Mozilla Pocket is a widely used application for managing reading lists that is built into the Firefox browser. Like many Mozilla projects, Pocket is open source, and the CDK Terrain codebase that Pocket uses to manage infrastructure for the recommendation API is also public and open source. Pocket’s codebase provides a great example of how to lay out a CDK Terrain project. In order to re-use components, Pocket’s codebase is separated out into a set of reusable modules. These are then used from CDK Terrain code in the recommendation-api codebase. The recommended reading order is to:- Read
Pocket/recommendation-api/.aws/src/main.ts. - Look at the constructs used that are defined in the
Pocket/terraform-modulesrepository, such asPocketALBApplication. - Look at the “base” constructs, which are are used in the higher-level constructs in the previous step.