Skip to content
EgyKode
Challenge

Terraform Fundamentals — Challenge

45 minBeginner

This creates billable resources. Run it in a dev environment and destroy it when you finish. Set a budget alarm first.

You are done when

0 of 5

The goal#

Achieve the same outcome as Terraform Fundamentals, from an empty starting point, without the steps.

Before a VPC module makes any sense, the five pieces underneath it have to be concrete: what a provider is, what a resource declaration produces, where a value comes in, where a value goes out, and what Terraform remembers between runs.

This lab builds the smallest infrastructure that exercises all five.

What must be true when you are done#

  • terraform apply creates an EC2 instance and an S3 bucket from a single configuration.
  • Running terraform apply a second time reports No changes — you can explain why.
  • The instance type comes from a variable, and the public IP leaves through an output.
  • You can point at the line in terraform.tfstate that maps your resource to its real AWS id.
  • terraform destroy removes everything, verified with the AWS CLI.

Rules#

  • Do not open the guided lab until you are finished, or until the same problem has held you up for 20 minutes.
  • Documentation is allowed. In the job it is the first thing you open.
  • Verify every criterion with a command whose output you can read.

If you get stuck#

  1. What did you expect, exactly?
  2. What happened instead — the error text, not a paraphrase?
  3. Which layer is that error from?
  4. What is the smallest command that proves the layer below is fine?

The concept behind it