Goal: Write a real Terraform configuration, run it entirely locally with zero cloud spend using LocalStack, then run the identical configuration against real AWS free-tier resources — so you experience firsthand what "diffing config against state" actually means.
No AWS account, or want to stay fully local? You may substitute the alternative local-cluster variant: use the community
tehcyx/kindprovider to declare a 3-node local Kubernetes cluster as code (terraform init/plan/apply, verify withkubectl get nodes, thenterraform destroy). See Resources for the provider docs and a walkthrough. Talk to your instructor before switching variants.
Steps:
tflocal wrapper (pip install terraform-local). Confirm all four are on your PATH.localstack start -d to bring up a local container that emulates AWS APIs on your machine — no AWS account charges, no free-tier risk.main.tf: an AWS provider block and a single t2.micro EC2 instance resource using an official free-tier AMI, following HashiCorp's official "Create infrastructure" tutorial (linked in Resources).tflocal init, tflocal plan, and tflocal apply (the wrapper transparently redirects AWS API calls to your LocalStack container). Confirm in the plan output that Terraform intends to create exactly one EC2 instance, then apply it and confirm it exists with awslocal ec2 describe-instances.local-plan.txt, local-apply.txt).terraform init, terraform plan, and terraform apply (no tflocal wrapper) on the exact same .tf files. Save this output too (aws-plan.txt, aws-apply.txt).terraform destroy to stay safely inside the free tier, and confirm in the AWS console that nothing is left running.pvarentsov/terraform-aws-free-tier repo (linked in Resources), review how it organizes free-tier AWS resources, and add one new resource of your own — for example, an S3 bucket with a lifecycle rule that expires objects after 30 days. Run tflocal plan/tflocal apply against LocalStack to prove it works before ever pointing it at real AWS.terraform.tfstate protected you from re-creating resources unnecessarily during this lab.Deliverables: Your main.tf (and any extended .tf files from Step 9), the four saved output files from Steps 5–6, your Step 7 diff write-up, and your Step 10 reflection, submitted as an upload (zipped folder or repo link) or pasted into the text entry box.