Install Terraform & AWS CLI
Source: doonops-curriculum/setup-cli--install-tools.md
Doonops lesson
Goal
Install Terraform and verify AWS CLI — after AWS account lesson if you do cloud labs.
Simple explanation
Two programs on your laptop: Terraform (reads .tf files) and AWS CLI (talks to Amazon with your keys).
Technical view
Terraform 1.9+; AWS CLI v2; credentials via aws configure; provider uses same chain.
Think of it like
Terraform = chef following recipe. AWS CLI = phone line to the supplier (AWS).
Steps
- Read simple section
- Read analogy + diagram
- Copy project files
- Do local lab
Deep explanation
Layman words first, then technical detail — read slowly
Install order
- AWS setup lesson (if Module 6+ planned) — account + aws configure
- Terraform — brew install terraform or official installer
- Editor — VS Code + HashiCorp Terraform extension (syntax highlight)
terraform version → must show 1.9+ aws --version → must show aws-cli/2.x aws sts get-caller-identity → JSON with Account (after configure)
Example (Doonops)
Modern HCL — names are examples, not from any third-party course
# versions.tf
terraform {
required_version = ">= 1.9.0"
}Terraform runs on your computer — copy this HCL into a folder, then follow the local lab steps below.
Check
- terraform version OK
- get-caller-identity OK if AWS labs planned
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/03-install-tools/
README.mdSee file purpose in the code below# Lab 02 — Install tools ## Terraform - macOS: brew install terraform - Windows: choco install terraform / MSI from hashicorp.com ## AWS CLI - aws configure - aws sts get-caller-identity Verify: ```bash terraform version aws --version ```