Skip to main content
This final module pulls together the core ideas from the course and describes practical strategies for turning those ideas into a maintainable, reusable infrastructure-as-code (IaC) codebase. Below is a concise, well-structured recap of what we covered and guidance for applying it in real projects.

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.
Then we completed three hands-on projects that built on each other.
  • Project 1 — TypeScript fundamentals: variables, types, classes, literals, functions, and other core language features.
A recap slide showing TypeScript concepts on the left, Terraform in the middle, and AWS infrastructure components on the right. It visually maps TypeScript → Terraform → AWS services like S3, Lambda, DynamoDB and API Gateway.
  • 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.
A vertical four-step timeline titled "What you have achieved" showing learning milestones. It lists goals like understanding IaC and CDKTF, learning TypeScript and CDKTF fundamentals, and building/deploying real-world infrastructure with brief bullet points.

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 sensible defaults (for quick onboarding) but allow clear overrides (for flexibility). For example, our Lambda construct created a role and reasonable defaults, while letting callers override runtime settings such as timeout or memory.
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.
Key recommendations:
  • 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.

Summary

We revisited the course’s core concepts and provided practical strategies to apply them: design reusable constructs, prefer proven modules, and plan state/backends for collaboration. These practices will help you scale infrastructure code across teams and projects while preserving clarity, safety, and reusability. The final module will provide suggested next steps and resources to continue your IaC journey.

Watch Video