Language

Capstone Project · Lesson 29 of 30

Capstone — End-to-End 3-Tier Lab

Source: doonops-curriculum/capstone--three-tier-full-stack.md

Doonops lesson

Goal

Connect everything: one project folder that builds VPC, app servers, load balancer — the same story as a real 3-tier deploy, step by step.

Simple explanation

Capstone = final exam project. You do not learn new tools — you combine modules you already studied. Build in layers, plan after each layer, destroy when finished.

Technical view

Recommended order: network (VPC module) → security groups → EC2/ASG → ALB listeners → RDS in DB subnets. Use outputs to pass IDs between .tf files. Single state or remote state for team.

Think of it like

Like cooking a full meal: prep (VPC), main dish (EC2), serving tray (ALB), storage jar (RDS) — each step tasted (plan) before serving (apply).

Steps

  1. Use capstone project files folder 25-capstone
  2. Layer 1: vpc.tf only → init, plan
  3. Layer 2: add SG + EC2 → plan
  4. Layer 3: add ALB → plan
  5. Layer 4: optional RDS → plan → apply only when ready
  6. destroy when done

Deep explanation

Layman words first, then technical detail — read slowly

Capstone architecture

Internet
   │
   ▼
[ ALB — public subnets ]
   │
   ▼
[ EC2 / ASG — private subnets ]
   │
   ▼
[ RDS — database subnets ]

Rules

  • One change at a time → terraform plan
  • Never skip AWS setup lesson (credentials)
  • Budget: destroy entire capstone stack same day
  • If stuck → Troubleshooting module

After capstone you are ready for Certification Prep module sample questions.

Project files for this lab

Full implementation folder — copy all files, then run terraform commands

Lab project files (full folder)

Copy every file below into one folder — same as a real repo module. Then run the local lab steps.

Suggested folder: Suggested path: ~/doonops-terraform/25-capstone/

versions.tfSee file purpose in the code below
terraform {
  required_version = ">= 1.9.0"
}

Capstone lab (2–4 hours)

Prerequisites

  • AWS configured
  • Modules 6–12 completed or understood
  • Project files copied
  1. mkdir -p ~/doonops-terraform/25-capstone && copy all capstone files
  2. terraform init
  3. Comment out all but vpc.tf → plan → fix errors
  4. Uncomment compute + alb → plan
  5. Optional RDS: plan review cost → apply
  6. Test ALB URL in browser if applied
  7. terraform destroy -auto-approve

Capstone done when

  • You planned each layer without blind apply
  • destroy ran successfully
  • You can explain data flow user → ALB → EC2

Module check — did you get it?

2–3 quick questions before the next module

Capstone — quick check

Quick check — did this module stick?

1. Capstone lab order should be…

  • Apply RDS before VPC exists
  • VPC → compute → ALB → DB, plan between steps
  • Only one giant apply with no plan
  • Skip destroy