Course recap — what we covered
We started with fundamentals of infrastructure and Infrastructure as Code (IaC), then introduced CDK for Terraform (CDKTF) and the benefits it brings:- Use familiar programming constructs (TypeScript) to generate Terraform configuration.
- Improve maintainability, testability, and reusability of infrastructure code.
- Leverage Terraform providers and the Terraform ecosystem while using higher-level abstractions.
- Project 1 — TypeScript fundamentals: variables, types, classes, literals, functions, and other core language features.

- Project 2 — CDKTF basics: create a local CDKTF project, synthesize Terraform configuration with the CDKTF CLI, and explore stacks, outputs, and the CDKTF construct model.
- Project 3 — Real AWS deployments: provisioned S3, API Gateway, DynamoDB, Lambda, and IAM. The final deliverable was a reusable, deployable API that returns a random name from a configurable list.
What you have achieved
- Understand core IaC concepts and why CDKTF is a strong choice for teams using TypeScript.
- Apply TypeScript to bring structure and type safety to your infrastructure code.
- Learn CDKTF fundamentals for synthesizing Terraform and organizing infrastructure with constructs and stacks.
- Build and deploy real-world AWS infrastructure (Lambda, IAM, S3, API Gateway, DynamoDB).
- Organize code using constructs and follow best practices for reusability and maintainability.

Quick project summary (at-a-glance)
Putting it all together — the tower analogy
Think of your infrastructure codebase as a tower of bricks. Each layer is a level of abstraction and responsibility. When adding new functionality, ask if it should be a new brick (separate module/construct) or part of an existing one. Layers (from foundation to top):
When deciding to split functionality, evaluate:
- Who will use the component?
- How will they use it (API/props and expected defaults)?
- What should be the default behavior vs. what should be overridable?
Design constructs with clear defaults and override points: defaults help users get started quickly; configurable properties make the construct reusable across teams and environments.
Practical design guidelines and best practices
- Prefer existing, reliable modules when they meet your needs — don’t rebuild what already works. See the Terraform Registry for vetted modules.
- Build custom constructs when requirements are unique or when you need organization-specific conventions.
- Define clear input/output contracts for constructs to make composition predictable.
- Keep stacks thin: a stack should represent a deployable unit (e.g., one environment or service).
- Use environment-aware configuration (workspaces, per-environment variables, or parameterized stacks) to avoid duplication.
- Version and document your constructs so teams can adopt them without guessing defaults.
Checklist — deciding to create a new construct or module
- Will more than one team or project reuse this functionality?
- Does the functionality represent a coherent unit of infrastructure (e.g., “serverless API” or “shared networking”)?
- Can you design a simple, stable API for configuration and sensible defaults? If you answered yes to these, a reusable construct/module is justified.
State, backends, and collaboration — important considerations
Always plan your state and backend strategy before collaborating. Remote state, locking, and consistent provider configuration are essential for team workflows and safe deployments.
- Use a remote backend (S3 + DynamoDB locking for AWS) in team environments.
- Keep provider and backend configuration in a stable foundation layer to avoid accidental drift.
- Use CI/CD to run synth and apply workflows consistently; restrict who can apply production changes.
Recommended next steps
- Continue practicing by extracting a construct from an existing stack and publishing it internally.
- Explore the Terraform Registry for modules you can adopt or adapt.
- Start a small catalog of organization-approved constructs with documentation and examples.
- Automate synthesis (CDKTF) and Terraform applies via CI/CD to standardize deployments.
- Read the CDKTF docs and Terraform provider docs to deepen provider-specific knowledge:
- CDKTF: https://developer.hashicorp.com/terraform/cdktf
- Terraform core: https://www.terraform.io
- Terraform Registry: https://registry.terraform.io
- TypeScript: https://www.typescriptlang.org